Skip to content

Commit

Permalink
refactor: simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
typicode committed Jan 25, 2024
1 parent 6b5d9df commit 00579e5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ let a = process.argv[2]
if (a == 'init') {
let p = process.env.npm_package_json
let d = JSON.parse(f.readFileSync(p))
d.scripts ||= {}
d.scripts.prepare = 'husky'
(d.scripts ||= {}).prepare = 'husky'
w('package.json', JSON.stringify(d, null, /\t/.test() ? '\t' : 2) + '\n')
process.stdout.write(i())
try { f.mkdirSync('.husky') } catch {}
Expand Down

0 comments on commit 00579e5

Please sign in to comment.