Skip to content

Commit

Permalink
fix(setup): don’t "hoodie-start" script if "start" script is set to "…
Browse files Browse the repository at this point in the history
…hoodie" (#681)
  • Loading branch information
gautamkrishnar authored and gr2m committed Jan 31, 2017
1 parent 0261c17 commit 986b642
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions bin/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ if (saveRequested) {
packageJson.scripts = packageJson.scripts || {}

if (packageJson.scripts[ 'start' ]) {
log.info('setup', 'start script already set to "' + packageJson.scripts[ 'start' ] +
', you can start hoodie with "npm run start-hoodie" instead')

packageJson.scripts[ 'start-hoodie' ] = 'hoodie'
if (!(packageJson.scripts[ 'start' ].startsWith('hoodie'))) {
log.info('setup', 'start script already set to "' + packageJson.scripts[ 'start' ] +
', you can start hoodie with "npm run start-hoodie" instead')
packageJson.scripts[ 'start-hoodie' ] = 'hoodie'
}
} else {
packageJson.scripts[ 'start' ] = 'hoodie'
}
Expand Down

0 comments on commit 986b642

Please sign in to comment.