create-weapp-vite 2.3.1 → 2.3.3
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/dist/cli.js +10 -10
- package/dist/index.js +1 -1
- package/dist/{src-DvR0tZv5.js → src-RVwSi_b2.js} +19 -15
- package/package.json +2 -2
- package/templates/default/package.json +4 -4
- package/templates/lib/package.json +5 -5
- package/templates/tailwindcss/package.json +4 -4
- package/templates/tdesign/package.json +4 -4
- package/templates/vant/package.json +4 -4
- package/templates/wevu/package.json +4 -4
- package/templates/wevu-tdesign/package.json +4 -4
package/dist/cli.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as RECOMMENDED_SKILLS_INSTALL_COMMAND,
|
|
1
|
+
import { n as RECOMMENDED_SKILLS_INSTALL_COMMAND, t as createProject } from "./src-RVwSi_b2.js";
|
|
2
2
|
import logger from "@weapp-core/logger";
|
|
3
3
|
import { fs } from "@weapp-core/shared/fs";
|
|
4
4
|
import process from "node:process";
|
|
@@ -40,39 +40,39 @@ async function run() {
|
|
|
40
40
|
default: false
|
|
41
41
|
}))) return;
|
|
42
42
|
}
|
|
43
|
-
await createProject(targetDir, isArgMode ? argTemplate ??
|
|
43
|
+
await createProject(targetDir, isArgMode ? argTemplate ?? "default" : await select({
|
|
44
44
|
message: "选择模板",
|
|
45
45
|
choices: [
|
|
46
46
|
{
|
|
47
47
|
name: "默认模板",
|
|
48
|
-
value:
|
|
48
|
+
value: "default"
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
name: "组件库模板 (lib 模式)",
|
|
52
|
-
value:
|
|
52
|
+
value: "lib"
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
name: "Wevu 模板 (Vue SFC)",
|
|
56
|
-
value:
|
|
56
|
+
value: "wevu"
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
name: "Wevu + TDesign 模板 (wevu + tdesign + tailwindcss)",
|
|
60
|
-
value:
|
|
60
|
+
value: "wevu-tdesign"
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
63
|
name: "集成 Tailwindcss",
|
|
64
|
-
value:
|
|
64
|
+
value: "tailwindcss"
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
67
|
name: "Vant 模板 (vant + tailwindcss)",
|
|
68
|
-
value:
|
|
68
|
+
value: "vant"
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
71
|
name: "TDesign 模板 (tdesign + tailwindcss)",
|
|
72
|
-
value:
|
|
72
|
+
value: "tdesign"
|
|
73
73
|
}
|
|
74
74
|
],
|
|
75
|
-
default:
|
|
75
|
+
default: "default"
|
|
76
76
|
}), { installSkills: isArgMode ? argInstallSkills ?? false : await confirm({
|
|
77
77
|
message: `是否安装推荐的 AI skills?将执行 \`${RECOMMENDED_SKILLS_INSTALL_COMMAND}\`,也可稍后手动执行`,
|
|
78
78
|
default: true
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { r as TemplateName, t as createProject } from "./src-
|
|
1
|
+
import { r as TemplateName, t as createProject } from "./src-RVwSi_b2.js";
|
|
2
2
|
export { TemplateName, createProject };
|
|
@@ -6,10 +6,10 @@ import https from "node:https";
|
|
|
6
6
|
import { spawn } from "node:child_process";
|
|
7
7
|
import process from "node:process";
|
|
8
8
|
//#region ../../packages-runtime/wevu/package.json
|
|
9
|
-
var version$1 = "6.15.
|
|
9
|
+
var version$1 = "6.15.10";
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region ../weapp-vite/package.json
|
|
12
|
-
var version = "6.15.
|
|
12
|
+
var version = "6.15.10";
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region src/enums.ts
|
|
15
15
|
let TemplateName = /* @__PURE__ */ function(TemplateName) {
|
|
@@ -25,7 +25,7 @@ let TemplateName = /* @__PURE__ */ function(TemplateName) {
|
|
|
25
25
|
//#endregion
|
|
26
26
|
//#region src/agents.ts
|
|
27
27
|
function supportsWevu(templateName) {
|
|
28
|
-
return [
|
|
28
|
+
return ["wevu", "wevu-tdesign"].includes(templateName);
|
|
29
29
|
}
|
|
30
30
|
function supportsNativePages(templateName) {
|
|
31
31
|
return !supportsWevu(templateName);
|
|
@@ -97,6 +97,8 @@ const TEMPLATE_CATALOG = {
|
|
|
97
97
|
"@babel/types": "^7.29.0",
|
|
98
98
|
"@douyin-microapp/typings": "^1.3.1",
|
|
99
99
|
"@egoist/tailwindcss-icons": "^1.9.2",
|
|
100
|
+
"@icebreakers/eslint-config": "^4.0.8",
|
|
101
|
+
"@icebreakers/stylelint-config": "^3.0.5",
|
|
100
102
|
"@iconify-json/mdi": "^1.2.3",
|
|
101
103
|
"@mini-types/alipay": "^3.0.14",
|
|
102
104
|
"@tailwindcss/postcss": "^4.2.2",
|
|
@@ -107,7 +109,7 @@ const TEMPLATE_CATALOG = {
|
|
|
107
109
|
"@vitejs/plugin-vue": "^6.0.6",
|
|
108
110
|
"@vue/compiler-core": "^3.5.32",
|
|
109
111
|
"@vue/compiler-dom": "^3.5.32",
|
|
110
|
-
"@vue/language-core": "^3.2.
|
|
112
|
+
"@vue/language-core": "^3.2.7",
|
|
111
113
|
"antd-mini": "^3.4.3",
|
|
112
114
|
"bundle-require": "^5.1.0",
|
|
113
115
|
"class-variance-authority": "^0.7.1",
|
|
@@ -126,7 +128,7 @@ const TEMPLATE_CATALOG = {
|
|
|
126
128
|
"tdesign-miniprogram": "^1.13.2",
|
|
127
129
|
"ts-morph": "^28.0.0",
|
|
128
130
|
"vite-plugin-inspect": "^11.3.3",
|
|
129
|
-
"vue-tsc": "^3.2.
|
|
131
|
+
"vue-tsc": "^3.2.7",
|
|
130
132
|
"weapp-tailwindcss": "^4.11.2",
|
|
131
133
|
autoprefixer: "^10.5.0",
|
|
132
134
|
clsx: "^2.1.1",
|
|
@@ -134,18 +136,20 @@ const TEMPLATE_CATALOG = {
|
|
|
134
136
|
debug: "^4.4.3",
|
|
135
137
|
echarts: "^6.0.0",
|
|
136
138
|
esbuild: "^0.28.0",
|
|
139
|
+
eslint: "^10.2.1",
|
|
137
140
|
fdir: "^6.5.0",
|
|
138
141
|
htmlparser2: "^12.0.0",
|
|
139
142
|
lodash: "^4.18.1",
|
|
140
143
|
merge: "^2.1.1",
|
|
141
144
|
pathe: "^2.0.3",
|
|
142
145
|
postcss: "^8.5.10",
|
|
143
|
-
rolldown: "1.0.0-rc.
|
|
146
|
+
rolldown: "1.0.0-rc.16",
|
|
144
147
|
sass: "^1.99.0",
|
|
148
|
+
stylelint: "^17.8.0",
|
|
145
149
|
tailwindcss: "^4.2.2",
|
|
146
150
|
tslib: "^2.8.1",
|
|
147
151
|
typescript: "^6.0.3",
|
|
148
|
-
vite: "8.0.
|
|
152
|
+
vite: "8.0.9",
|
|
149
153
|
vue: "^3.5.32",
|
|
150
154
|
zod: "^4.3.6"
|
|
151
155
|
};
|
|
@@ -374,13 +378,13 @@ const WINDOWS_VERBATIM_PATH_RE = /^\\\\\?\\/;
|
|
|
374
378
|
const TOURIST_APP_ID = "touristappid";
|
|
375
379
|
const moduleDir = path.dirname(fileURLToPath(import.meta.url));
|
|
376
380
|
const TEMPLATE_DIR_MAP = {
|
|
377
|
-
[
|
|
378
|
-
[
|
|
379
|
-
[
|
|
380
|
-
[
|
|
381
|
-
[
|
|
382
|
-
[
|
|
383
|
-
[
|
|
381
|
+
["default"]: "weapp-vite-template",
|
|
382
|
+
["lib"]: "weapp-vite-lib-template",
|
|
383
|
+
["wevu"]: "weapp-vite-wevu-template",
|
|
384
|
+
["wevu-tdesign"]: "weapp-vite-wevu-tailwindcss-tdesign-template",
|
|
385
|
+
["tailwindcss"]: "weapp-vite-tailwindcss-template",
|
|
386
|
+
["tdesign"]: "weapp-vite-tailwindcss-tdesign-template",
|
|
387
|
+
["vant"]: "weapp-vite-tailwindcss-vant-template"
|
|
384
388
|
};
|
|
385
389
|
const templateCatalogMap = { ...TEMPLATE_CATALOG };
|
|
386
390
|
const templateNamedCatalogMap = Object.fromEntries(Object.entries(TEMPLATE_NAMED_CATALOG).map(([name, deps]) => [name, { ...deps }]));
|
|
@@ -515,7 +519,7 @@ function normalizeTemplateDependencySpecs(pkgJson) {
|
|
|
515
519
|
/**
|
|
516
520
|
* @description 根据模板创建项目
|
|
517
521
|
*/
|
|
518
|
-
async function createProject(targetDir = "", templateName =
|
|
522
|
+
async function createProject(targetDir = "", templateName = "default", options = {}) {
|
|
519
523
|
const { preferredTemplateDir, workspaceTemplateDir } = await resolveTemplateDirs(templateName);
|
|
520
524
|
const dotGitignorePath = path.resolve(targetDir, ".gitignore");
|
|
521
525
|
const existingGitignore = await fs.pathExists(dotGitignorePath) ? await fs.readFile(dotGitignorePath, "utf8") : null;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-weapp-vite",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.3.
|
|
4
|
+
"version": "2.3.3",
|
|
5
5
|
"description": "create-weapp-vite",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"node": "^20.19.0 || >=22.12.0"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@inquirer/prompts": "^8.4.
|
|
50
|
+
"@inquirer/prompts": "^8.4.2",
|
|
51
51
|
"pathe": "^2.0.3",
|
|
52
52
|
"pkg-types": "^2.3.0",
|
|
53
53
|
"@weapp-core/logger": "^3.1.1",
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
"postinstall": "wv prepare"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@icebreakers/eslint-config": "
|
|
32
|
-
"@icebreakers/stylelint-config": "
|
|
33
|
-
"eslint": "
|
|
31
|
+
"@icebreakers/eslint-config": "catalog:",
|
|
32
|
+
"@icebreakers/stylelint-config": "catalog:",
|
|
33
|
+
"eslint": "catalog:",
|
|
34
34
|
"miniprogram-api-typings": "catalog:",
|
|
35
35
|
"sass": "catalog:",
|
|
36
|
-
"stylelint": "
|
|
36
|
+
"stylelint": "catalog:",
|
|
37
37
|
"typescript": "catalog:",
|
|
38
38
|
"weapp-vite": "workspace:*",
|
|
39
39
|
"wevu": "workspace:*"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weapp-vite-lib-template",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "6.0.
|
|
4
|
+
"version": "6.0.10",
|
|
5
5
|
"private": true,
|
|
6
6
|
"description": "weapp-vite 组件库(lib 模式)模板",
|
|
7
7
|
"author": "ice breaker <1324318532@qq.com>",
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"wevu": "workspace:*"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@icebreakers/eslint-config": "
|
|
36
|
-
"@icebreakers/stylelint-config": "
|
|
37
|
-
"eslint": "
|
|
35
|
+
"@icebreakers/eslint-config": "catalog:",
|
|
36
|
+
"@icebreakers/stylelint-config": "catalog:",
|
|
37
|
+
"eslint": "catalog:",
|
|
38
38
|
"miniprogram-api-typings": "catalog:",
|
|
39
39
|
"sass": "catalog:",
|
|
40
|
-
"stylelint": "
|
|
40
|
+
"stylelint": "catalog:",
|
|
41
41
|
"typescript": "catalog:",
|
|
42
42
|
"weapp-vite": "workspace:*",
|
|
43
43
|
"wevu": "workspace:*"
|
|
@@ -29,15 +29,15 @@
|
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@egoist/tailwindcss-icons": "catalog:",
|
|
32
|
-
"@icebreakers/eslint-config": "
|
|
33
|
-
"@icebreakers/stylelint-config": "
|
|
32
|
+
"@icebreakers/eslint-config": "catalog:",
|
|
33
|
+
"@icebreakers/stylelint-config": "catalog:",
|
|
34
34
|
"@iconify-json/mdi": "catalog:",
|
|
35
35
|
"autoprefixer": "catalog:",
|
|
36
|
-
"eslint": "
|
|
36
|
+
"eslint": "catalog:",
|
|
37
37
|
"miniprogram-api-typings": "catalog:",
|
|
38
38
|
"postcss": "catalog:",
|
|
39
39
|
"sass": "catalog:",
|
|
40
|
-
"stylelint": "
|
|
40
|
+
"stylelint": "catalog:",
|
|
41
41
|
"tailwindcss": "catalog:tailwind3",
|
|
42
42
|
"typescript": "catalog:",
|
|
43
43
|
"weapp-tailwindcss": "catalog:",
|
|
@@ -32,15 +32,15 @@
|
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@egoist/tailwindcss-icons": "catalog:",
|
|
35
|
-
"@icebreakers/eslint-config": "
|
|
36
|
-
"@icebreakers/stylelint-config": "
|
|
35
|
+
"@icebreakers/eslint-config": "catalog:",
|
|
36
|
+
"@icebreakers/stylelint-config": "catalog:",
|
|
37
37
|
"@iconify-json/mdi": "catalog:",
|
|
38
38
|
"autoprefixer": "catalog:",
|
|
39
|
-
"eslint": "
|
|
39
|
+
"eslint": "catalog:",
|
|
40
40
|
"miniprogram-api-typings": "catalog:",
|
|
41
41
|
"postcss": "catalog:",
|
|
42
42
|
"sass": "catalog:",
|
|
43
|
-
"stylelint": "
|
|
43
|
+
"stylelint": "catalog:",
|
|
44
44
|
"tailwindcss": "catalog:tailwind3",
|
|
45
45
|
"typescript": "catalog:",
|
|
46
46
|
"weapp-tailwindcss": "catalog:",
|
|
@@ -32,15 +32,15 @@
|
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@egoist/tailwindcss-icons": "catalog:",
|
|
35
|
-
"@icebreakers/eslint-config": "
|
|
36
|
-
"@icebreakers/stylelint-config": "
|
|
35
|
+
"@icebreakers/eslint-config": "catalog:",
|
|
36
|
+
"@icebreakers/stylelint-config": "catalog:",
|
|
37
37
|
"@iconify-json/mdi": "catalog:",
|
|
38
38
|
"autoprefixer": "catalog:",
|
|
39
|
-
"eslint": "
|
|
39
|
+
"eslint": "catalog:",
|
|
40
40
|
"miniprogram-api-typings": "catalog:",
|
|
41
41
|
"postcss": "catalog:",
|
|
42
42
|
"sass": "catalog:",
|
|
43
|
-
"stylelint": "
|
|
43
|
+
"stylelint": "catalog:",
|
|
44
44
|
"tailwindcss": "catalog:tailwind3",
|
|
45
45
|
"typescript": "catalog:",
|
|
46
46
|
"weapp-tailwindcss": "catalog:",
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"postinstall": "wv prepare"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@icebreakers/eslint-config": "
|
|
32
|
-
"@icebreakers/stylelint-config": "
|
|
33
|
-
"eslint": "
|
|
31
|
+
"@icebreakers/eslint-config": "catalog:",
|
|
32
|
+
"@icebreakers/stylelint-config": "catalog:",
|
|
33
|
+
"eslint": "catalog:",
|
|
34
34
|
"miniprogram-api-typings": "catalog:",
|
|
35
|
-
"stylelint": "
|
|
35
|
+
"stylelint": "catalog:",
|
|
36
36
|
"typescript": "catalog:",
|
|
37
37
|
"vue-tsc": "catalog:",
|
|
38
38
|
"weapp-vite": "workspace:*",
|
|
@@ -32,15 +32,15 @@
|
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@egoist/tailwindcss-icons": "catalog:",
|
|
35
|
-
"@icebreakers/eslint-config": "
|
|
36
|
-
"@icebreakers/stylelint-config": "
|
|
35
|
+
"@icebreakers/eslint-config": "catalog:",
|
|
36
|
+
"@icebreakers/stylelint-config": "catalog:",
|
|
37
37
|
"@iconify-json/mdi": "catalog:",
|
|
38
38
|
"autoprefixer": "catalog:",
|
|
39
|
-
"eslint": "
|
|
39
|
+
"eslint": "catalog:",
|
|
40
40
|
"miniprogram-api-typings": "catalog:",
|
|
41
41
|
"postcss": "catalog:",
|
|
42
42
|
"sass": "catalog:",
|
|
43
|
-
"stylelint": "
|
|
43
|
+
"stylelint": "catalog:",
|
|
44
44
|
"tailwindcss": "catalog:tailwind3",
|
|
45
45
|
"typescript": "catalog:",
|
|
46
46
|
"vue-tsc": "catalog:",
|