Use a single script (#57)

It is easier to add more scripts later this way.
This commit is contained in:
Dan Abramov
2016-07-21 15:02:27 +01:00
committed by GitHub
parent 4ae57e0a16
commit e0558bc4c6
7 changed files with 25 additions and 15 deletions

View File

@@ -26,8 +26,7 @@ module.exports = function(hostPath, appName, verbose) {
// Setup the script rules
hostPackage.scripts = {};
['start', 'build', 'eject'].forEach(function(command) {
hostPackage.scripts[command] =
command + '-react-app';
hostPackage.scripts[command] = 'react-scripts ' + command;
});
fs.writeFileSync(
@@ -53,7 +52,7 @@ module.exports = function(hostPath, appName, verbose) {
copySync(
path.join(selfPath, 'template', filename),
path.join(hostPath, filename)
);
);
});
// Run another npm install for react and react-dom