Skip to content

Commit

Permalink
fix: fix init not work on pnpm #1334 (#1347)
Browse files Browse the repository at this point in the history
* fix: fix init not work on pnpm #1334

* doc: pnpm users must run init on project root

* Update bin.js

* Update bin.js

* Update get-started.md

---------

Co-authored-by: 键来! <jmpecx@outlook.com>
Co-authored-by: typicode <typicode@gmail.com>
  • Loading branch information
3 people authored Jan 25, 2024
1 parent f874dfb commit 34ace26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import i from './index.js'
let a = process.argv[2]

if (a == 'init') {
let p = process.env.npm_package_json
let p = 'package.json'
let d = JSON.parse(f.readFileSync(p))
(d.scripts ||= {}).prepare = 'husky'
w('package.json', JSON.stringify(d, null, /\t/.test() ? '\t' : 2) + '\n')
Expand Down

0 comments on commit 34ace26

Please sign in to comment.