Skip to content

Commit d9067f0

Browse files
committed
Updated to 1.0.14
1 parent da30fbc commit d9067f0

File tree

86 files changed

+1166
-749
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+1166
-749
lines changed

bin/react-scripts.js

+12-7
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
#!/usr/bin/env node
22
/**
33
* Copyright (c) 2015-present, Facebook, Inc.
4-
* All rights reserved.
54
*
6-
* This source code is licensed under the BSD-style license found in the
7-
* LICENSE file in the root directory of this source tree. An additional grant
8-
* of patent rights can be found in the PATENTS file in the same directory.
5+
* This source code is licensed under the MIT license found in the
6+
* LICENSE file in the root directory of this source tree.
97
*/
108

119
'use strict';
1210

1311
const spawn = require('react-dev-utils/crossSpawn');
14-
const script = process.argv[2];
15-
const args = process.argv.slice(3);
12+
const args = process.argv.slice(2);
13+
14+
const scriptIndex = args.findIndex(
15+
x => x === 'build' || x === 'eject' || x === 'start' || x === 'test'
16+
);
17+
const script = scriptIndex === -1 ? args[0] : args[scriptIndex];
18+
const nodeArgs = scriptIndex > 0 ? args.slice(0, scriptIndex) : [];
1619

1720
switch (script) {
1821
case 'build':
@@ -21,7 +24,9 @@ switch (script) {
2124
case 'test': {
2225
const result = spawn.sync(
2326
'node',
24-
[require.resolve('../scripts/' + script)].concat(args),
27+
nodeArgs
28+
.concat(require.resolve('../scripts/' + script))
29+
.concat(args.slice(scriptIndex + 1)),
2530
{ stdio: 'inherit' }
2631
);
2732
if (result.signal) {

config/env.js

+6-11
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
// @remove-on-eject-begin
22
/**
33
* Copyright (c) 2015-present, Facebook, Inc.
4-
* All rights reserved.
54
*
6-
* This source code is licensed under the BSD-style license found in the
7-
* LICENSE file in the root directory of this source tree. An additional grant
8-
* of patent rights can be found in the PATENTS file in the same directory.
5+
* This source code is licensed under the MIT license found in the
6+
* LICENSE file in the root directory of this source tree.
97
*/
108
// @remove-on-eject-end
119
'use strict';
@@ -88,13 +86,10 @@ function getClientEnvironment(publicUrl) {
8886
);
8987
// Stringify all values so we can feed into Webpack DefinePlugin
9088
const stringified = {
91-
'process.env': Object.keys(raw).reduce(
92-
(env, key) => {
93-
env[key] = JSON.stringify(raw[key]);
94-
return env;
95-
},
96-
{}
97-
),
89+
'process.env': Object.keys(raw).reduce((env, key) => {
90+
env[key] = JSON.stringify(raw[key]);
91+
return env;
92+
}, {}),
9893
};
9994

10095
return { raw, stringified };

config/jest/babelTransform.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
// @remove-file-on-eject
22
/**
3-
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
3+
* Copyright (c) 2014-present, Facebook, Inc.
44
*
5-
* This source code is licensed under the BSD-style license found in the
6-
* LICENSE file in the root directory of this source tree. An additional grant
7-
* of patent rights can be found in the PATENTS file in the same directory.
5+
* This source code is licensed under the MIT license found in the
6+
* LICENSE file in the root directory of this source tree.
87
*/
98
'use strict';
109

config/jest/cssTransform.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
// @remove-on-eject-begin
22
/**
3-
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
3+
* Copyright (c) 2014-present, Facebook, Inc.
44
*
5-
* This source code is licensed under the BSD-style license found in the
6-
* LICENSE file in the root directory of this source tree. An additional grant
7-
* of patent rights can be found in the PATENTS file in the same directory.
5+
* This source code is licensed under the MIT license found in the
6+
* LICENSE file in the root directory of this source tree.
87
*/
98
// @remove-on-eject-end
109
'use strict';

config/jest/fileTransform.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
// @remove-on-eject-begin
22
/**
3-
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
3+
* Copyright (c) 2014-present, Facebook, Inc.
44
*
5-
* This source code is licensed under the BSD-style license found in the
6-
* LICENSE file in the root directory of this source tree. An additional grant
7-
* of patent rights can be found in the PATENTS file in the same directory.
5+
* This source code is licensed under the MIT license found in the
6+
* LICENSE file in the root directory of this source tree.
87
*/
98
// @remove-on-eject-end
109
'use strict';

config/paths.js

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
// @remove-on-eject-begin
22
/**
33
* Copyright (c) 2015-present, Facebook, Inc.
4-
* All rights reserved.
54
*
6-
* This source code is licensed under the BSD-style license found in the
7-
* LICENSE file in the root directory of this source tree. An additional grant
8-
* of patent rights can be found in the PATENTS file in the same directory.
5+
* This source code is licensed under the MIT license found in the
6+
* LICENSE file in the root directory of this source tree.
97
*/
108
// @remove-on-eject-end
119
'use strict';
@@ -43,8 +41,8 @@ const getPublicUrl = appPackageJson =>
4341
// like /todos/42/static/js/bundle.7289d.js. We have to know the root.
4442
function getServedPath(appPackageJson) {
4543
const publicUrl = getPublicUrl(appPackageJson);
46-
const servedUrl = envPublicUrl ||
47-
(publicUrl ? url.parse(publicUrl).pathname : '/');
44+
const servedUrl =
45+
envPublicUrl || (publicUrl ? url.parse(publicUrl).pathname : '/');
4846
return ensureSlash(servedUrl, true);
4947
}
5048

@@ -89,7 +87,8 @@ module.exports = {
8987

9088
const ownPackageJson = require('../package.json');
9189
const reactScriptsPath = resolveApp(`node_modules/${ownPackageJson.name}`);
92-
const reactScriptsLinked = fs.existsSync(reactScriptsPath) &&
90+
const reactScriptsLinked =
91+
fs.existsSync(reactScriptsPath) &&
9392
fs.lstatSync(reactScriptsPath).isSymbolicLink();
9493

9594
// config before publish: we're in ./packages/react-scripts/config/

config/polyfills.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
// @remove-on-eject-begin
22
/**
33
* Copyright (c) 2015-present, Facebook, Inc.
4-
* All rights reserved.
54
*
6-
* This source code is licensed under the BSD-style license found in the
7-
* LICENSE file in the root directory of this source tree. An additional grant
8-
* of patent rights can be found in the PATENTS file in the same directory.
5+
* This source code is licensed under the MIT license found in the
6+
* LICENSE file in the root directory of this source tree.
97
*/
108
// @remove-on-eject-end
119
'use strict';

0 commit comments

Comments
 (0)