@lntvow/dev 0.1.0 → 0.1.2

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": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "开发环境依赖包",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -17,7 +17,8 @@
17
17
  "commitizen": "^4.3.0",
18
18
  "cz-conventional-changelog": "^3.3.0",
19
19
  "husky": "^9.0.11",
20
- "lint-staged": "^15.2.2"
20
+ "lint-staged": "^15.2.2",
21
+ "rimraf": "^5.0.5"
21
22
  },
22
23
  "lint-staged": {
23
24
  "*.{js,jsx,ts,tsx,vue}": [
@@ -28,6 +29,10 @@
28
29
  ]
29
30
  },
30
31
  "scripts": {
32
+ "dev": "vite --host",
33
+ "build:test": "vite build --mode development",
34
+ "build:uat": "vite build --mode uat",
35
+ "build:prod": "vite build",
31
36
  "commit": "git add . && git-cz && git push",
32
37
  "rimraf": "rimraf ./node_modules/",
33
38
  "release": "git add . && bumpp package.json --all --commit --no-tag --push",
@@ -54,7 +54,23 @@ setTimeout(() => {
54
54
  '*.{js,jsx,ts,tsx,vue}': ['eslint --fix'],
55
55
  '*.{json,css,scss,md}': ['prettier --write'],
56
56
  }
57
- fs.writeFileSync(path.resolve(cwd, './package.json'), JSON.stringify(packageJsonObj, null, 2))
58
57
  }
58
+
59
+ if (!packageJsonObj.scripts) {
60
+ packageJsonObj.scripts = {}
61
+ }
62
+
63
+ packageJsonObj.scripts = {
64
+ dev: 'vite --host',
65
+ 'build:test': 'vite build --mode development',
66
+ 'build:uat': 'vite build --mode uat',
67
+ 'build:prod': 'vite build',
68
+ commit: 'git add . && git-cz && git push',
69
+ rimraf: 'rimraf ./node_modules/',
70
+ release: 'git add . && bumpp package.json --all --commit --no-tag --push',
71
+ ...packageJsonObj.scripts,
72
+ }
73
+
74
+ fs.writeFileSync(path.resolve(cwd, './package.json'), JSON.stringify(packageJsonObj, null, 2))
59
75
  console.log('lint-staged 配置写入成功')
60
- }, 1000)
76
+ }, 5000)