create-young-proj 0.9.0 → 0.10.0

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.
Files changed (2) hide show
  1. package/init.mjs +10 -0
  2. package/package.json +5 -3
package/init.mjs ADDED
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env node
2
+ import { execa } from 'execa'
3
+
4
+ try {
5
+ await execa('npx', ['simple-git-hooks'])
6
+ console.log('simple-git-hooks installed successfully')
7
+ }
8
+ catch (error) {
9
+ console.log('just intsall to use, not dev')
10
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-young-proj",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "create project from template",
5
5
  "author": "BluesYoung-web",
6
6
  "license": "MIT",
@@ -24,7 +24,8 @@
24
24
  "cyp": "index.mjs"
25
25
  },
26
26
  "files": [
27
- "index.js",
27
+ "index.mjs",
28
+ "init.mjs",
28
29
  "template-*",
29
30
  "dist"
30
31
  ],
@@ -36,13 +37,14 @@
36
37
  "build": "unbuild",
37
38
  "lint": "eslint .",
38
39
  "lint:fix": "eslint . --fix",
39
- "postinstall": "simple-git-hooks"
40
+ "postinstall": "node ./init.mjs"
40
41
  },
41
42
  "devDependencies": {
42
43
  "@antfu/eslint-config": "^0.41.0",
43
44
  "@types/node": "16",
44
45
  "cross-spawn": "^7.0.3",
45
46
  "eslint": "^8.48.0",
47
+ "execa": "^8.0.1",
46
48
  "jiti": "^1.19.3",
47
49
  "kolorist": "^1.6.0",
48
50
  "lint-staged": "^14.0.1",