create-weapp-vite 2.2.2 → 2.3.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.
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
- import { n as RECOMMENDED_SKILLS_INSTALL_COMMAND, r as TemplateName, t as createProject } from "./src-1o7CWmth.js";
1
+ import { n as RECOMMENDED_SKILLS_INSTALL_COMMAND, r as TemplateName, t as createProject } from "./src-7ecnJJjw.js";
2
2
  import logger from "@weapp-core/logger";
3
- import { fs } from "@weapp-core/shared";
3
+ import { fs } from "@weapp-core/shared/fs";
4
4
  import process from "node:process";
5
5
  import path from "node:path";
6
6
  import { confirm, input, select } from "@inquirer/prompts";
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { r as TemplateName, t as createProject } from "./src-1o7CWmth.js";
1
+ import { r as TemplateName, t as createProject } from "./src-7ecnJJjw.js";
2
2
  export { TemplateName, createProject };
@@ -1,15 +1,15 @@
1
1
  import { fileURLToPath } from "node:url";
2
2
  import logger from "@weapp-core/logger";
3
- import { fs } from "@weapp-core/shared";
3
+ import { fs } from "@weapp-core/shared/fs";
4
4
  import path from "pathe";
5
5
  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.5";
9
+ var version$1 = "6.15.7";
10
10
  //#endregion
11
11
  //#region ../weapp-vite/package.json
12
- var version = "6.15.5";
12
+ var version = "6.15.7";
13
13
  //#endregion
14
14
  //#region src/enums.ts
15
15
  let TemplateName = /* @__PURE__ */ function(TemplateName) {
@@ -95,6 +95,7 @@ const TEMPLATE_CATALOG = {
95
95
  "@babel/parser": "^7.29.2",
96
96
  "@babel/traverse": "^7.29.0",
97
97
  "@babel/types": "^7.29.0",
98
+ "@douyin-microapp/typings": "^1.3.1",
98
99
  "@egoist/tailwindcss-icons": "^1.9.2",
99
100
  "@iconify-json/mdi": "^1.2.3",
100
101
  "@mini-types/alipay": "^3.0.14",
@@ -116,7 +117,7 @@ const TEMPLATE_CATALOG = {
116
117
  "lru-cache": "^11.3.5",
117
118
  "magic-string": "^0.30.21",
118
119
  "miniprogram-api-typings": "^5.1.2",
119
- "oxc-parser": "^0.125.0",
120
+ "oxc-parser": "^0.126.0",
120
121
  "oxc-walker": "^0.7.0",
121
122
  "pkg-types": "^2.3.0",
122
123
  "sass-embedded": "^1.99.0",
@@ -127,7 +128,7 @@ const TEMPLATE_CATALOG = {
127
128
  "vite-plugin-inspect": "^11.3.3",
128
129
  "vue-tsc": "^3.2.6",
129
130
  "weapp-tailwindcss": "^4.11.2",
130
- autoprefixer: "^10.4.27",
131
+ autoprefixer: "^10.5.0",
131
132
  clsx: "^2.1.1",
132
133
  dayjs: "^1.11.20",
133
134
  debug: "^4.4.3",
@@ -138,12 +139,12 @@ const TEMPLATE_CATALOG = {
138
139
  lodash: "^4.18.1",
139
140
  merge: "^2.1.1",
140
141
  pathe: "^2.0.3",
141
- postcss: "^8.5.9",
142
+ postcss: "^8.5.10",
142
143
  rolldown: "1.0.0-rc.15",
143
144
  sass: "^1.99.0",
144
145
  tailwindcss: "^4.2.2",
145
146
  tslib: "^2.8.1",
146
- typescript: "^6.0.2",
147
+ typescript: "^6.0.3",
147
148
  vite: "8.0.8",
148
149
  vue: "^3.5.32",
149
150
  zod: "^4.3.6"
@@ -153,7 +154,7 @@ const TEMPLATE_NAMED_CATALOG = {
153
154
  "weapp-tailwindcss-fixed": { "weapp-tailwindcss": "4.11.2" },
154
155
  latest: {
155
156
  "miniprogram-api-typings": "^5.1.2",
156
- typescript: "^6.0.2"
157
+ typescript: "^6.0.3"
157
158
  },
158
159
  tailwind3: { tailwindcss: "3.4.19" },
159
160
  tailwind4: { tailwindcss: "^4.2.2" }
@@ -370,6 +371,7 @@ async function updateGitIgnore(options) {
370
371
  const DIGIT_RE = /\d/;
371
372
  const CRLF_RE = /\r\n/g;
372
373
  const WINDOWS_VERBATIM_PATH_RE = /^\\\\\?\\/;
374
+ const TOURIST_APP_ID = "touristappid";
373
375
  const moduleDir = path.dirname(fileURLToPath(import.meta.url));
374
376
  const TEMPLATE_DIR_MAP = {
375
377
  [TemplateName.default]: "weapp-vite-template",
@@ -443,6 +445,14 @@ async function ensureDotGitignore(root) {
443
445
  }
444
446
  await fs.move(gitignorePath, dotGitignorePath);
445
447
  }
448
+ async function rewriteProjectConfigAppId(targetDir) {
449
+ const projectConfigPath = path.resolve(targetDir, "project.config.json");
450
+ if (!await fs.pathExists(projectConfigPath)) return;
451
+ const projectConfig = await fs.readJSON(projectConfigPath);
452
+ if (!projectConfig || typeof projectConfig !== "object" || projectConfig.appid === TOURIST_APP_ID) return;
453
+ projectConfig.appid = TOURIST_APP_ID;
454
+ await writeJsonFile(projectConfigPath, projectConfig);
455
+ }
446
456
  function createEmptyPackageJson() {
447
457
  return {
448
458
  name: "weapp-vite-app",
@@ -514,6 +524,7 @@ async function createProject(targetDir = "", templateName = TemplateName.default
514
524
  return;
515
525
  }
516
526
  await copyTemplateDir(preferredTemplateDir, workspaceTemplateDir, targetDir);
527
+ await rewriteProjectConfigAppId(targetDir);
517
528
  const templatePackagePath = path.resolve(preferredTemplateDir, "package.json");
518
529
  const packageJsonPath = path.resolve(targetDir, "package.json");
519
530
  await ensureDotGitignore(targetDir);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-weapp-vite",
3
3
  "type": "module",
4
- "version": "2.2.2",
4
+ "version": "2.3.0",
5
5
  "description": "create-weapp-vite",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -51,7 +51,7 @@
51
51
  "pathe": "^2.0.3",
52
52
  "pkg-types": "^2.3.0",
53
53
  "@weapp-core/logger": "^3.1.1",
54
- "@weapp-core/shared": "^3.0.3"
54
+ "@weapp-core/shared": "^3.0.4"
55
55
  },
56
56
  "scripts": {
57
57
  "catalog:sync": "node --import tsx scripts/generate-template-catalog.ts",
@@ -28,12 +28,12 @@
28
28
  "postinstall": "wv prepare"
29
29
  },
30
30
  "devDependencies": {
31
- "@icebreakers/eslint-config": "^4.0.4",
31
+ "@icebreakers/eslint-config": "^4.0.5",
32
32
  "@icebreakers/stylelint-config": "^3.0.4",
33
33
  "eslint": "^10.2.0",
34
34
  "miniprogram-api-typings": "catalog:",
35
35
  "sass": "catalog:",
36
- "stylelint": "^17.7.0",
36
+ "stylelint": "^17.8.0",
37
37
  "typescript": "catalog:",
38
38
  "weapp-vite": "workspace:*",
39
39
  "wevu": "workspace:*"
@@ -39,5 +39,5 @@
39
39
  "ignore": [],
40
40
  "include": []
41
41
  },
42
- "appid": "wx6ffee4673b257014"
42
+ "appid": "wxb3d842a4a7e3440d"
43
43
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "weapp-vite-lib-template",
3
3
  "type": "module",
4
- "version": "6.0.5",
4
+ "version": "6.0.7",
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": "^4.0.4",
35
+ "@icebreakers/eslint-config": "^4.0.5",
36
36
  "@icebreakers/stylelint-config": "^3.0.4",
37
37
  "eslint": "^10.2.0",
38
38
  "miniprogram-api-typings": "catalog:",
39
39
  "sass": "catalog:",
40
- "stylelint": "^17.7.0",
40
+ "stylelint": "^17.8.0",
41
41
  "typescript": "catalog:",
42
42
  "weapp-vite": "workspace:*",
43
43
  "wevu": "workspace:*"
@@ -39,5 +39,5 @@
39
39
  "ignore": [],
40
40
  "include": []
41
41
  },
42
- "appid": "touristappid"
42
+ "appid": "wxb3d842a4a7e3440d"
43
43
  }
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "devDependencies": {
31
31
  "@egoist/tailwindcss-icons": "catalog:",
32
- "@icebreakers/eslint-config": "^4.0.4",
32
+ "@icebreakers/eslint-config": "^4.0.5",
33
33
  "@icebreakers/stylelint-config": "^3.0.4",
34
34
  "@iconify-json/mdi": "catalog:",
35
35
  "autoprefixer": "catalog:",
@@ -37,7 +37,7 @@
37
37
  "miniprogram-api-typings": "catalog:",
38
38
  "postcss": "catalog:",
39
39
  "sass": "catalog:",
40
- "stylelint": "^17.7.0",
40
+ "stylelint": "^17.8.0",
41
41
  "tailwindcss": "catalog:tailwind3",
42
42
  "typescript": "catalog:",
43
43
  "weapp-tailwindcss": "catalog:",
@@ -39,5 +39,5 @@
39
39
  "ignore": [],
40
40
  "include": []
41
41
  },
42
- "appid": "wx6ffee4673b257014"
42
+ "appid": "wxb3d842a4a7e3440d"
43
43
  }
@@ -1,4 +1,4 @@
1
- import { UnifiedViteWeappTailwindcssPlugin } from 'weapp-tailwindcss/vite'
1
+ import { weappTailwindcss } from 'weapp-tailwindcss/vite'
2
2
  import { defineConfig } from 'weapp-vite'
3
3
 
4
4
  export default defineConfig({
@@ -30,8 +30,8 @@ export default defineConfig({
30
30
  },
31
31
  },
32
32
  plugins: [
33
- UnifiedViteWeappTailwindcssPlugin({
33
+ weappTailwindcss({
34
34
  rem2rpx: true,
35
- }) as any,
35
+ }),
36
36
  ],
37
37
  })
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "devDependencies": {
34
34
  "@egoist/tailwindcss-icons": "catalog:",
35
- "@icebreakers/eslint-config": "^4.0.4",
35
+ "@icebreakers/eslint-config": "^4.0.5",
36
36
  "@icebreakers/stylelint-config": "^3.0.4",
37
37
  "@iconify-json/mdi": "catalog:",
38
38
  "autoprefixer": "catalog:",
@@ -40,7 +40,7 @@
40
40
  "miniprogram-api-typings": "catalog:",
41
41
  "postcss": "catalog:",
42
42
  "sass": "catalog:",
43
- "stylelint": "^17.7.0",
43
+ "stylelint": "^17.8.0",
44
44
  "tailwindcss": "catalog:tailwind3",
45
45
  "typescript": "catalog:",
46
46
  "weapp-tailwindcss": "catalog:",
@@ -41,5 +41,5 @@
41
41
  "ignore": [],
42
42
  "include": []
43
43
  },
44
- "appid": "wx6ffee4673b257014"
44
+ "appid": "wxb3d842a4a7e3440d"
45
45
  }
@@ -1,4 +1,4 @@
1
- import { UnifiedViteWeappTailwindcssPlugin } from 'weapp-tailwindcss/vite'
1
+ import { weappTailwindcss } from 'weapp-tailwindcss/vite'
2
2
  import { defineConfig } from 'weapp-vite'
3
3
  import { TDesignResolver } from 'weapp-vite/auto-import-components/resolvers'
4
4
 
@@ -43,8 +43,8 @@ export default defineConfig({
43
43
  },
44
44
  },
45
45
  plugins: [
46
- UnifiedViteWeappTailwindcssPlugin({
46
+ weappTailwindcss({
47
47
  rem2rpx: true,
48
- }) as any,
48
+ }),
49
49
  ],
50
50
  })
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "devDependencies": {
34
34
  "@egoist/tailwindcss-icons": "catalog:",
35
- "@icebreakers/eslint-config": "^4.0.4",
35
+ "@icebreakers/eslint-config": "^4.0.5",
36
36
  "@icebreakers/stylelint-config": "^3.0.4",
37
37
  "@iconify-json/mdi": "catalog:",
38
38
  "autoprefixer": "catalog:",
@@ -40,7 +40,7 @@
40
40
  "miniprogram-api-typings": "catalog:",
41
41
  "postcss": "catalog:",
42
42
  "sass": "catalog:",
43
- "stylelint": "^17.7.0",
43
+ "stylelint": "^17.8.0",
44
44
  "tailwindcss": "catalog:tailwind3",
45
45
  "typescript": "catalog:",
46
46
  "weapp-tailwindcss": "catalog:",
@@ -39,5 +39,5 @@
39
39
  "ignore": [],
40
40
  "include": []
41
41
  },
42
- "appid": "wx6ffee4673b257014"
42
+ "appid": "wxb3d842a4a7e3440d"
43
43
  }
@@ -1,4 +1,4 @@
1
- import { UnifiedViteWeappTailwindcssPlugin } from 'weapp-tailwindcss/vite'
1
+ import { weappTailwindcss } from 'weapp-tailwindcss/vite'
2
2
  import { defineConfig } from 'weapp-vite'
3
3
  import { VantResolver } from 'weapp-vite/auto-import-components/resolvers'
4
4
 
@@ -43,8 +43,8 @@ export default defineConfig({
43
43
  },
44
44
  },
45
45
  plugins: [
46
- UnifiedViteWeappTailwindcssPlugin({
46
+ weappTailwindcss({
47
47
  rem2rpx: true,
48
- }) as any,
48
+ }),
49
49
  ],
50
50
  })
@@ -28,11 +28,11 @@
28
28
  "postinstall": "wv prepare"
29
29
  },
30
30
  "devDependencies": {
31
- "@icebreakers/eslint-config": "^4.0.4",
31
+ "@icebreakers/eslint-config": "^4.0.5",
32
32
  "@icebreakers/stylelint-config": "^3.0.4",
33
33
  "eslint": "^10.2.0",
34
34
  "miniprogram-api-typings": "catalog:",
35
- "stylelint": "^17.7.0",
35
+ "stylelint": "^17.8.0",
36
36
  "typescript": "catalog:",
37
37
  "vue-tsc": "catalog:",
38
38
  "weapp-vite": "workspace:*",
@@ -39,5 +39,5 @@
39
39
  "ignore": [],
40
40
  "include": []
41
41
  },
42
- "appid": "wx6ffee4673b257014"
42
+ "appid": "wxb3d842a4a7e3440d"
43
43
  }
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "devDependencies": {
34
34
  "@egoist/tailwindcss-icons": "catalog:",
35
- "@icebreakers/eslint-config": "^4.0.4",
35
+ "@icebreakers/eslint-config": "^4.0.5",
36
36
  "@icebreakers/stylelint-config": "^3.0.4",
37
37
  "@iconify-json/mdi": "catalog:",
38
38
  "autoprefixer": "catalog:",
@@ -40,7 +40,7 @@
40
40
  "miniprogram-api-typings": "catalog:",
41
41
  "postcss": "catalog:",
42
42
  "sass": "catalog:",
43
- "stylelint": "^17.7.0",
43
+ "stylelint": "^17.8.0",
44
44
  "tailwindcss": "catalog:tailwind3",
45
45
  "typescript": "catalog:",
46
46
  "vue-tsc": "catalog:",
@@ -39,5 +39,5 @@
39
39
  "ignore": [],
40
40
  "include": []
41
41
  },
42
- "appid": "wx6ffee4673b257014"
42
+ "appid": "wxb3d842a4a7e3440d"
43
43
  }
@@ -1,5 +1,5 @@
1
1
  import path from 'node:path'
2
- import { UnifiedViteWeappTailwindcssPlugin } from 'weapp-tailwindcss/vite'
2
+ import { weappTailwindcss } from 'weapp-tailwindcss/vite'
3
3
  import { defineConfig } from 'weapp-vite'
4
4
  import { TDesignResolver } from 'weapp-vite/auto-import-components/resolvers'
5
5
 
@@ -64,8 +64,8 @@ export default defineConfig({
64
64
  },
65
65
  },
66
66
  plugins: [
67
- UnifiedViteWeappTailwindcssPlugin({
67
+ weappTailwindcss({
68
68
  rem2rpx: true,
69
- }) as any,
69
+ }),
70
70
  ],
71
71
  })