create-weapp-vite 2.2.2 → 2.2.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 CHANGED
@@ -1,4 +1,4 @@
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-D2C12kEJ.js";
2
2
  import logger from "@weapp-core/logger";
3
3
  import { fs } from "@weapp-core/shared";
4
4
  import process from "node:process";
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-D2C12kEJ.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.5";
9
+ var version$1 = "6.15.6";
10
10
  //#endregion
11
11
  //#region ../weapp-vite/package.json
12
- var version = "6.15.5";
12
+ var version = "6.15.6";
13
13
  //#endregion
14
14
  //#region src/enums.ts
15
15
  let TemplateName = /* @__PURE__ */ function(TemplateName) {
@@ -127,7 +127,7 @@ const TEMPLATE_CATALOG = {
127
127
  "vite-plugin-inspect": "^11.3.3",
128
128
  "vue-tsc": "^3.2.6",
129
129
  "weapp-tailwindcss": "^4.11.2",
130
- autoprefixer: "^10.4.27",
130
+ autoprefixer: "^10.5.0",
131
131
  clsx: "^2.1.1",
132
132
  dayjs: "^1.11.20",
133
133
  debug: "^4.4.3",
@@ -370,6 +370,7 @@ async function updateGitIgnore(options) {
370
370
  const DIGIT_RE = /\d/;
371
371
  const CRLF_RE = /\r\n/g;
372
372
  const WINDOWS_VERBATIM_PATH_RE = /^\\\\\?\\/;
373
+ const TOURIST_APP_ID = "touristappid";
373
374
  const moduleDir = path.dirname(fileURLToPath(import.meta.url));
374
375
  const TEMPLATE_DIR_MAP = {
375
376
  [TemplateName.default]: "weapp-vite-template",
@@ -443,6 +444,14 @@ async function ensureDotGitignore(root) {
443
444
  }
444
445
  await fs.move(gitignorePath, dotGitignorePath);
445
446
  }
447
+ async function rewriteProjectConfigAppId(targetDir) {
448
+ const projectConfigPath = path.resolve(targetDir, "project.config.json");
449
+ if (!await fs.pathExists(projectConfigPath)) return;
450
+ const projectConfig = await fs.readJSON(projectConfigPath);
451
+ if (!projectConfig || typeof projectConfig !== "object" || projectConfig.appid === TOURIST_APP_ID) return;
452
+ projectConfig.appid = TOURIST_APP_ID;
453
+ await writeJsonFile(projectConfigPath, projectConfig);
454
+ }
446
455
  function createEmptyPackageJson() {
447
456
  return {
448
457
  name: "weapp-vite-app",
@@ -514,6 +523,7 @@ async function createProject(targetDir = "", templateName = TemplateName.default
514
523
  return;
515
524
  }
516
525
  await copyTemplateDir(preferredTemplateDir, workspaceTemplateDir, targetDir);
526
+ await rewriteProjectConfigAppId(targetDir);
517
527
  const templatePackagePath = path.resolve(preferredTemplateDir, "package.json");
518
528
  const packageJsonPath = path.resolve(targetDir, "package.json");
519
529
  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.2.3",
5
5
  "description": "create-weapp-vite",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -28,7 +28,7 @@
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:",
@@ -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.6",
5
5
  "private": true,
6
6
  "description": "weapp-vite 组件库(lib 模式)模板",
7
7
  "author": "ice breaker <1324318532@qq.com>",
@@ -32,7 +32,7 @@
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,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:",
@@ -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:",
@@ -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:",
@@ -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,7 +28,7 @@
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:",
@@ -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:",
@@ -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
  })