Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Meta
create-react-app
Commits
21b00444
Commit
21b00444
authored
8 years ago
by
Eduard Kyvenko
Committed by
Ville Immonen
8 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Remove path-exists from dependencies and replace it with fs.existsSync (#1289)
parent
5fa34ddb
No related merge requests found
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
packages/react-scripts/package.json
+0
-1
packages/react-scripts/package.json
packages/react-scripts/scripts/build.js
+1
-2
packages/react-scripts/scripts/build.js
packages/react-scripts/scripts/eject.js
+1
-2
packages/react-scripts/scripts/eject.js
packages/react-scripts/scripts/init.js
+2
-3
packages/react-scripts/scripts/init.js
packages/react-scripts/scripts/start.js
+2
-2
packages/react-scripts/scripts/start.js
packages/react-scripts/utils/createJestConfig.js
+2
-2
packages/react-scripts/utils/createJestConfig.js
with
8 additions
and
12 deletions
+8
-12
packages/react-scripts/package.json
+
0
-
1
View file @
21b00444
...
...
@@ -53,7 +53,6 @@
"jest"
:
"17.0.2"
,
"json-loader"
:
"0.5.4"
,
"object-assign"
:
"4.1.0"
,
"path-exists"
:
"2.1.0"
,
"postcss-loader"
:
"1.0.0"
,
"promise"
:
"7.1.1"
,
"react-dev-utils"
:
"^0.4.2"
,
...
...
This diff is collapsed.
Click to expand it.
packages/react-scripts/scripts/build.js
+
1
-
2
View file @
21b00444
...
...
@@ -21,7 +21,6 @@ require('dotenv').config({silent: true});
var
chalk
=
require
(
'
chalk
'
);
var
fs
=
require
(
'
fs-extra
'
);
var
path
=
require
(
'
path
'
);
var
pathExists
=
require
(
'
path-exists
'
);
var
filesize
=
require
(
'
filesize
'
);
var
gzipSize
=
require
(
'
gzip-size
'
).
sync
;
var
webpack
=
require
(
'
webpack
'
);
...
...
@@ -31,7 +30,7 @@ var checkRequiredFiles = require('react-dev-utils/checkRequiredFiles');
var
recursive
=
require
(
'
recursive-readdir
'
);
var
stripAnsi
=
require
(
'
strip-ansi
'
);
var
useYarn
=
pathE
xists
.
s
ync
(
paths
.
yarnLockFile
);
var
useYarn
=
fs
.
e
xists
S
ync
(
paths
.
yarnLockFile
);
// Warn and crash if required files are missing
if
(
!
checkRequiredFiles
([
paths
.
appHtml
,
paths
.
appIndexJs
]))
{
...
...
This diff is collapsed.
Click to expand it.
packages/react-scripts/scripts/eject.js
+
1
-
2
View file @
21b00444
...
...
@@ -10,7 +10,6 @@
var
createJestConfig
=
require
(
'
../utils/createJestConfig
'
);
var
fs
=
require
(
'
fs-extra
'
);
var
path
=
require
(
'
path
'
);
var
pathExists
=
require
(
'
path-exists
'
);
var
paths
=
require
(
'
../config/paths
'
);
var
prompt
=
require
(
'
react-dev-utils/prompt
'
);
var
spawnSync
=
require
(
'
cross-spawn
'
).
sync
;
...
...
@@ -144,7 +143,7 @@ prompt(
);
console
.
log
();
if
(
pathE
xists
.
s
ync
(
paths
.
yarnLockFile
))
{
if
(
fs
.
e
xists
S
ync
(
paths
.
yarnLockFile
))
{
console
.
log
(
cyan
(
'
Running yarn...
'
));
fs
.
removeSync
(
ownPath
);
spawnSync
(
'
yarn
'
,
[],
{
stdio
:
'
inherit
'
});
...
...
This diff is collapsed.
Click to expand it.
packages/react-scripts/scripts/init.js
+
2
-
3
View file @
21b00444
...
...
@@ -10,14 +10,13 @@
var
fs
=
require
(
'
fs-extra
'
);
var
path
=
require
(
'
path
'
);
var
spawn
=
require
(
'
cross-spawn
'
);
var
pathExists
=
require
(
'
path-exists
'
);
var
chalk
=
require
(
'
chalk
'
);
module
.
exports
=
function
(
appPath
,
appName
,
verbose
,
originalDirectory
)
{
var
ownPackageName
=
require
(
path
.
join
(
__dirname
,
'
..
'
,
'
package.json
'
)).
name
;
var
ownPath
=
path
.
join
(
appPath
,
'
node_modules
'
,
ownPackageName
);
var
appPackage
=
require
(
path
.
join
(
appPath
,
'
package.json
'
));
var
useYarn
=
pathE
xists
.
s
ync
(
path
.
join
(
appPath
,
'
yarn.lock
'
));
var
useYarn
=
fs
.
e
xists
S
ync
(
path
.
join
(
appPath
,
'
yarn.lock
'
));
// Copy over some of the devDependencies
appPackage
.
dependencies
=
appPackage
.
dependencies
||
{};
...
...
@@ -36,7 +35,7 @@ module.exports = function(appPath, appName, verbose, originalDirectory) {
JSON
.
stringify
(
appPackage
,
null
,
2
)
);
var
readmeExists
=
pathE
xists
.
s
ync
(
path
.
join
(
appPath
,
'
README.md
'
));
var
readmeExists
=
fs
.
e
xists
S
ync
(
path
.
join
(
appPath
,
'
README.md
'
));
if
(
readmeExists
)
{
fs
.
renameSync
(
path
.
join
(
appPath
,
'
README.md
'
),
path
.
join
(
appPath
,
'
README.old.md
'
));
}
...
...
This diff is collapsed.
Click to expand it.
packages/react-scripts/scripts/start.js
+
2
-
2
View file @
21b00444
...
...
@@ -29,11 +29,11 @@ var formatWebpackMessages = require('react-dev-utils/formatWebpackMessages');
var
getProcessForPort
=
require
(
'
react-dev-utils/getProcessForPort
'
);
var
openBrowser
=
require
(
'
react-dev-utils/openBrowser
'
);
var
prompt
=
require
(
'
react-dev-utils/prompt
'
);
var
pathExist
s
=
require
(
'
path-exist
s
'
);
var
f
s
=
require
(
'
f
s
'
);
var
config
=
require
(
'
../config/webpack.config.dev
'
);
var
paths
=
require
(
'
../config/paths
'
);
var
useYarn
=
pathE
xists
.
s
ync
(
paths
.
yarnLockFile
);
var
useYarn
=
fs
.
e
xists
S
ync
(
paths
.
yarnLockFile
);
var
cli
=
useYarn
?
'
yarn
'
:
'
npm
'
;
var
isInteractive
=
process
.
stdout
.
isTTY
;
...
...
This diff is collapsed.
Click to expand it.
packages/react-scripts/utils/createJestConfig.js
+
2
-
2
View file @
21b00444
...
...
@@ -9,13 +9,13 @@
// Note: this file does not exist after ejecting.
const
pathExist
s
=
require
(
'
path-exist
s
'
);
const
f
s
=
require
(
'
f
s
'
);
const
paths
=
require
(
'
../config/paths
'
);
module
.
exports
=
(
resolve
,
rootDir
,
isEjecting
)
=>
{
// Use this instead of `paths.testsSetup` to avoid putting
// an absolute filename into configuration after ejecting.
const
setupTestsFile
=
pathE
xists
.
s
ync
(
paths
.
testsSetup
)
?
'
<rootDir>/src/setupTests.js
'
:
undefined
;
const
setupTestsFile
=
fs
.
e
xists
S
ync
(
paths
.
testsSetup
)
?
'
<rootDir>/src/setupTests.js
'
:
undefined
;
// TODO: I don't know if it's safe or not to just use / as path separator
// in Jest configs. We need help from somebody with Windows to determine this.
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets