Commit 1b6f58cf authored by Shubheksha Jalan's avatar Shubheksha Jalan Committed by Dan Abramov
Browse files

Forked react-scripts should retain the binary name (#754)

* Forked react-scripts should retain the binary name

* Forked react-scripts should retain the binary name -- fixed issue with regex

* Forked react-scripts should retain the binary name -- fixed style nit
parent e0dfa305
No related merge requests found
Showing with 5 additions and 8 deletions
+5 -8
...@@ -94,10 +94,7 @@ prompt( ...@@ -94,10 +94,7 @@ prompt(
delete appPackage.scripts['eject']; delete appPackage.scripts['eject'];
Object.keys(appPackage.scripts).forEach(function (key) { Object.keys(appPackage.scripts).forEach(function (key) {
appPackage.scripts[key] = appPackage.scripts[key] appPackage.scripts[key] = appPackage.scripts[key]
.replace( .replace(/react-scripts (\w+)/g, 'node scripts/$1.js');
new RegExp(ownPackageName + ' (\\w+)', 'g'),
'node scripts/$1.js'
);
}); });
// Add Jest config // Add Jest config
......
...@@ -24,10 +24,10 @@ module.exports = function(appPath, appName, verbose, originalDirectory) { ...@@ -24,10 +24,10 @@ module.exports = function(appPath, appName, verbose, originalDirectory) {
// Setup the script rules // Setup the script rules
appPackage.scripts = { appPackage.scripts = {
'start': ownPackageName + ' start', 'start': 'react-scripts start',
'build': ownPackageName + ' build', 'build': 'react-scripts build',
'test': ownPackageName + ' test --env=jsdom', 'test': 'react-scripts test --env=jsdom',
'eject': ownPackageName + ' eject' 'eject': 'react-scripts eject'
}; };
fs.writeFileSync( fs.writeFileSync(
......
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