@hlw-uni/mp-cli 1.0.19 → 1.0.20
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/bin/cli.js +0 -0
- package/package.json +37 -37
- package/templates/mp-toutiao/base/package.json +2 -2
- package/templates/mp-toutiao/base/src/main.ts +1 -0
- package/templates/mp-weixin/base/package.json +2 -2
- package/templates/mp-weixin/base/src/main.ts +1 -0
- package/templates/mp-weixin/base/src/manifest.json +6 -2
package/bin/cli.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
2
|
+
"name": "@hlw-uni/mp-cli",
|
|
3
|
+
"version": "1.0.20",
|
|
4
|
+
"description": "uniapp 小程序脚手架生成器",
|
|
5
|
+
"main": "bin/cli.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"hlw-uni-mp": "./bin/cli.js"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"dev": "tsx bin/cli.ts",
|
|
11
|
+
"create": "tsx bin/cli.ts create",
|
|
12
|
+
"build": "esbuild bin/cli.ts --bundle --platform=node --outfile=bin/cli.js --format=cjs --external:fs-extra --external:inquirer --external:chalk --external:commander --external:ora --external:path --external:fs",
|
|
13
|
+
"prepublish": "pnpm build",
|
|
14
|
+
"postbuild": "node scripts/fix-templates-path.js"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"uniapp",
|
|
18
|
+
"scaffold",
|
|
19
|
+
"weixin",
|
|
20
|
+
"toutiao",
|
|
21
|
+
"miniprogram"
|
|
22
|
+
],
|
|
23
|
+
"author": "hlw2326",
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"chalk": "^4.1.2",
|
|
27
|
+
"commander": "^11.1.0",
|
|
28
|
+
"fs-extra": "^11.2.0",
|
|
29
|
+
"inquirer": "^8.2.7",
|
|
30
|
+
"ora": "^5.4.1"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@types/fs-extra": "^11.0.4",
|
|
34
|
+
"@types/node": "^20.11.0",
|
|
35
|
+
"esbuild": "^0.28.0",
|
|
36
|
+
"tsx": "^4.19.0"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"@dcloudio/uni-app-plus": "3.0.0-4080420251103001",
|
|
12
12
|
"@dcloudio/uni-components": "3.0.0-4080420251103001",
|
|
13
13
|
"@dcloudio/uni-mp-toutiao": "3.0.0-4080420251103001",
|
|
14
|
-
"@hlw-uni/mp-core": "^1.0.
|
|
14
|
+
"@hlw-uni/mp-core": "^1.0.9",
|
|
15
15
|
"@hlw-uni/mp-vue": "^1.0.2",
|
|
16
16
|
"@vueuse/core": "^10.9.0",
|
|
17
17
|
"pinia": "^2.1.7",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@dcloudio/types": "^3.4.8",
|
|
23
23
|
"@dcloudio/uni-cli-shared": "3.0.0-4080420251103001",
|
|
24
24
|
"@dcloudio/vite-plugin-uni": "3.0.0-4080420251103001",
|
|
25
|
-
"@hlw-uni/mp-vite-plugin": "^1.0.
|
|
25
|
+
"@hlw-uni/mp-vite-plugin": "^1.0.9",
|
|
26
26
|
"@unocss/transformer-directives": "^66.1.1",
|
|
27
27
|
"@vue/tsconfig": "^0.1.3",
|
|
28
28
|
"sass": "^1.70.0",
|
|
@@ -7,6 +7,7 @@ import { useUserStore } from "./stores/user";
|
|
|
7
7
|
|
|
8
8
|
// 注册默认拦截器(Token + 业务错误 + 401)
|
|
9
9
|
setupDefaultInterceptors({
|
|
10
|
+
baseURL: (import.meta.env as Record<string, string>).VITE_API_BASE_URL ?? "",
|
|
10
11
|
getToken: () => useUserStore().token,
|
|
11
12
|
onUnauthorized: () => {
|
|
12
13
|
useUserStore().$patch({ token: "", userInfo: null });
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"@dcloudio/uni-app-plus": "3.0.0-4080420251103001",
|
|
13
13
|
"@dcloudio/uni-components": "3.0.0-4080420251103001",
|
|
14
14
|
"@dcloudio/uni-mp-weixin": "3.0.0-4080420251103001",
|
|
15
|
-
"@hlw-uni/mp-core": "^1.0.
|
|
15
|
+
"@hlw-uni/mp-core": "^1.0.9",
|
|
16
16
|
"@hlw-uni/mp-vue": "^1.0.2",
|
|
17
17
|
"@vueuse/core": "^10.9.0",
|
|
18
18
|
"pinia": "^2.1.7",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@dcloudio/types": "^3.4.8",
|
|
24
24
|
"@dcloudio/uni-cli-shared": "3.0.0-4080420251103001",
|
|
25
25
|
"@dcloudio/vite-plugin-uni": "3.0.0-4080420251103001",
|
|
26
|
-
"@hlw-uni/mp-vite-plugin": "^1.0.
|
|
26
|
+
"@hlw-uni/mp-vite-plugin": "^1.0.9",
|
|
27
27
|
"@unocss/transformer-directives": "^66.1.1",
|
|
28
28
|
"@vue/tsconfig": "^0.1.3",
|
|
29
29
|
"sass": "^1.70.0",
|
|
@@ -7,6 +7,7 @@ import { useUserStore } from "./stores/user";
|
|
|
7
7
|
|
|
8
8
|
// 注册默认拦截器(Token + 业务错误 + 401)
|
|
9
9
|
setupDefaultInterceptors({
|
|
10
|
+
baseURL: (import.meta.env as Record<string, string>).VITE_API_BASE_URL ?? "",
|
|
10
11
|
getToken: () => useUserStore().token,
|
|
11
12
|
onUnauthorized: () => {
|
|
12
13
|
useUserStore().$patch({ token: "", userInfo: null });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "",
|
|
2
|
+
"name": "hlw-uni",
|
|
3
3
|
"appid": "",
|
|
4
4
|
"description": "",
|
|
5
5
|
"versionName": "1.0.0",
|
|
@@ -7,7 +7,11 @@
|
|
|
7
7
|
"transformPx": false,
|
|
8
8
|
"mp-weixin": {
|
|
9
9
|
"appid": "",
|
|
10
|
-
"setting": {
|
|
10
|
+
"setting": {
|
|
11
|
+
"urlCheck": false,
|
|
12
|
+
"postcss": true,
|
|
13
|
+
"minified": true
|
|
14
|
+
},
|
|
11
15
|
"usingComponents": true
|
|
12
16
|
}
|
|
13
17
|
}
|