@lntvow/dev 2.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lntvow/dev",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "type": "module",
5
5
  "description": "开发环境依赖包",
6
6
  "license": "MIT",
@@ -30,6 +30,6 @@
30
30
  "commit": "git add . && git-cz && git push",
31
31
  "rimraf": "rimraf ./node_modules/",
32
32
  "release": "git add . && bumpp package.json --all --commit --no-tag --push",
33
- "postinstall": "node ./script/postinstall.js && npx simple-git-hooks"
33
+ "postinstall": "node ./script/postinstall.js"
34
34
  }
35
35
  }
@@ -1,3 +1,4 @@
1
+ /* eslint-disable no-console */
1
2
  import { exec } from 'node:child_process'
2
3
  import fs from 'node:fs'
3
4
  import path from 'node:path'
@@ -38,5 +39,12 @@ function copyDirectorySync(source, target) {
38
39
  // 复制模板文件
39
40
  copyDirectorySync(path.resolve(__dirname, './tmp'), cwd)
40
41
 
41
- // 初始化 husky
42
- exec('npx husky install', { cwd })
42
+ // 初始化
43
+ exec('npx simple-git-hooks', { cwd }, (err, str) => {
44
+ console.log('npx simple-git-hooks')
45
+ if (err) {
46
+ console.log('npx simple-git-hooks err', err)
47
+ } else {
48
+ console.log(str)
49
+ }
50
+ })