mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-04-01 09:01:04 +08:00
Use a single script (#57)
It is easier to add more scripts later this way.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user