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
4d11e6a6
Commit
4d11e6a6
authored
8 years ago
by
Dan Abramov
Committed by
Christopher Chedeau
8 years ago
Browse files
Options
Download
Email Patches
Plain Diff
npm install on graduation
parent
07ad9b02
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/graduate.js
+8
-2
scripts/graduate.js
with
8 additions
and
2 deletions
+8
-2
scripts/graduate.js
+
8
-
2
View file @
4d11e6a6
...
...
@@ -9,8 +9,9 @@
var
fs
=
require
(
'
fs
'
);
var
path
=
require
(
'
path
'
);
var
spawnSync
=
require
(
'
child_process
'
).
spawnSync
;
console
.
log
(
'
Extracting scripts
...
'
);
console
.
log
(
'
Graduating
...
'
);
console
.
log
();
var
selfPath
=
path
.
join
(
__dirname
,
'
..
'
);
...
...
@@ -65,11 +66,16 @@ Object.keys(hostPackage.scripts).forEach(function (key) {
});
delete
hostPackage
.
scripts
[
'
graduate
'
];
console
.
log
(
'
Writing package.json
...
'
);
console
.
log
(
'
Writing package.json
'
);
fs
.
writeFileSync
(
path
.
join
(
hostPath
,
'
package.json
'
),
JSON
.
stringify
(
hostPackage
,
null
,
2
)
);
console
.
log
();
console
.
log
(
'
Running npm install...
'
);
spawnSync
(
'
rm
'
,
[
'
-rf
'
,
selfPath
]);
spawnSync
(
'
npm
'
,
[
'
install
'
],
{
stdio
:
'
inherit
'
});
console
.
log
();
console
.
log
(
'
Done!
'
);
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