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
2da6edab
Commit
2da6edab
authored
8 years ago
by
Brian Ng
Committed by
Dan Abramov
8 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Replace rimraf with fs-extra functions (#1072)
parent
058b2cc8
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 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
+3
-4
packages/react-scripts/scripts/eject.js
with
4 additions
and
7 deletions
+4
-7
packages/react-scripts/package.json
+
0
-
1
View file @
2da6edab
...
...
@@ -58,7 +58,6 @@
"promise"
:
"7.1.1"
,
"react-dev-utils"
:
"^0.3.0"
,
"recursive-readdir"
:
"2.1.0"
,
"rimraf"
:
"2.5.4"
,
"strip-ansi"
:
"3.0.1"
,
"style-loader"
:
"0.13.1"
,
"url-loader"
:
"0.5.7"
,
...
...
This diff is collapsed.
Click to expand it.
packages/react-scripts/scripts/build.js
+
1
-
2
View file @
2da6edab
...
...
@@ -24,7 +24,6 @@ var path = require('path');
var
pathExists
=
require
(
'
path-exists
'
);
var
filesize
=
require
(
'
filesize
'
);
var
gzipSize
=
require
(
'
gzip-size
'
).
sync
;
var
rimrafSync
=
require
(
'
rimraf
'
).
sync
;
var
webpack
=
require
(
'
webpack
'
);
var
config
=
require
(
'
../config/webpack.config.prod
'
);
var
paths
=
require
(
'
../config/paths
'
);
...
...
@@ -78,7 +77,7 @@ recursive(paths.appBuild, (err, fileNames) => {
// Remove all content but keep the directory so that
// if you're in it, you don't end up in Trash
rimraf
Sync
(
paths
.
appBuild
+
'
/*
'
);
fs
.
emptyDir
Sync
(
paths
.
appBuild
);
// Start the webpack build
build
(
previousSizeMap
);
...
...
This diff is collapsed.
Click to expand it.
packages/react-scripts/scripts/eject.js
+
3
-
4
View file @
2da6edab
...
...
@@ -8,12 +8,11 @@
*/
var
createJestConfig
=
require
(
'
../utils/createJestConfig
'
);
var
fs
=
require
(
'
fs
'
);
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
rimrafSync
=
require
(
'
rimraf
'
).
sync
;
var
spawnSync
=
require
(
'
cross-spawn
'
).
sync
;
var
chalk
=
require
(
'
chalk
'
);
var
green
=
chalk
.
green
;
...
...
@@ -147,11 +146,11 @@ prompt(
if
(
pathExists
.
sync
(
paths
.
yarnLockFile
))
{
console
.
log
(
cyan
(
'
Running yarn...
'
));
rimraf
Sync
(
ownPath
);
fs
.
remove
Sync
(
ownPath
);
spawnSync
(
'
yarn
'
,
[],
{
stdio
:
'
inherit
'
});
}
else
{
console
.
log
(
cyan
(
'
Running npm install...
'
));
rimraf
Sync
(
ownPath
);
fs
.
remove
Sync
(
ownPath
);
spawnSync
(
'
npm
'
,
[
'
install
'
],
{
stdio
:
'
inherit
'
});
}
console
.
log
(
green
(
'
Ejected successfully!
'
));
...
...
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