Skip to content

Commit

Permalink
refactor(init): avoid Object.assign() for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
ybiquitous committed Jun 16, 2018
1 parent 8fe523c commit 49c8650
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,8 @@ class Init {
if (!('test' in scripts)) {
scripts.test = 'test'
}
Object.assign(scripts, {
'test:watch': `${scripts.test} --watch`,
'test:coverage': 'echo "unsupported." && exit 1',
})
scripts['test:watch'] = `${scripts.test} --watch`
scripts['test:coverage'] = 'echo "unsupported." && exit 1'
Object.keys(originalPackage.scripts)
.filter(key => !(key === 'test' || key.startsWith('test:')))
.forEach(key => {
Expand Down

0 comments on commit 49c8650

Please sign in to comment.