Skip to content
This repository has been archived by the owner on Jan 26, 2019. It is now read-only.

Commit

Permalink
add check to filter out custom scripts in eject command (#2562)
Browse files Browse the repository at this point in the history
  • Loading branch information
paweljedrzejczyk authored and wmonk committed Aug 7, 2017
1 parent 6d42a3c commit d585b5a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/react-scripts/scripts/eject.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ inquirer
Object.keys(appPackage.scripts).forEach(key => {
Object.keys(ownPackage.bin).forEach(binKey => {
const regex = new RegExp(binKey + ' (\\w+)', 'g');
if (!regex.test(appPackage.scripts[key])) {
return;
}
appPackage.scripts[key] = appPackage.scripts[key].replace(
regex,
'node scripts/$1.js'
Expand Down

0 comments on commit d585b5a

Please sign in to comment.