Commit 4d11e6a6 authored by Dan Abramov's avatar Dan Abramov Committed by Christopher Chedeau
Browse files

npm install on graduation

parent 07ad9b02
No related merge requests found
Showing with 8 additions and 2 deletions
+8 -2
......@@ -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!');
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment