Skip to content

Commit

Permalink
add check to filter out custom scripts in eject command (facebook#2562)
Browse files Browse the repository at this point in the history
  • Loading branch information
paweljedrzejczyk authored and romaindso committed Jul 10, 2017
1 parent 44ba358 commit db923b9
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 db923b9

Please sign in to comment.