Skip to content

Commit

Permalink
refactor: simplify (#1349)
Browse files Browse the repository at this point in the history
* refactor: simplify

* indent
  • Loading branch information
typicode authored Jan 25, 2024
1 parent 6b5d9df commit f874dfb
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 f874dfb

Please sign in to comment.