Skip to content

Commit f874dfb

Browse files
authored
refactor: simplify (#1349)
* refactor: simplify * indent
1 parent 6b5d9df commit f874dfb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

bin.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ let a = process.argv[2]
77
if (a == 'init') {
88
let p = process.env.npm_package_json
99
let d = JSON.parse(f.readFileSync(p))
10-
d.scripts ||= {}
11-
d.scripts.prepare = 'husky'
10+
(d.scripts ||= {}).prepare = 'husky'
1211
w('package.json', JSON.stringify(d, null, /\t/.test() ? '\t' : 2) + '\n')
1312
process.stdout.write(i())
1413
try { f.mkdirSync('.husky') } catch {}

0 commit comments

Comments
 (0)