create-weapp-vite 2.3.3 → 2.3.5

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.
Files changed (81) hide show
  1. package/README.md +5 -3
  2. package/dist/cli.js +36 -31
  3. package/dist/index.d.ts +1 -0
  4. package/dist/index.js +1 -1
  5. package/dist/{src-RVwSi_b2.js → src-Tx4viskG.js} +20 -8
  6. package/package.json +1 -1
  7. package/templates/default/eslint.config.js +1 -1
  8. package/templates/default/package.json +1 -0
  9. package/templates/default/src/app.scss +1 -0
  10. package/templates/default/src/components/HelloWorld/HelloWorld.scss +10 -10
  11. package/templates/default/src/pages/index/index.scss +1 -0
  12. package/templates/lib/eslint.config.js +1 -1
  13. package/templates/lib/package.json +2 -1
  14. package/templates/lib/src/app.scss +1 -0
  15. package/templates/lib/src/components/HelloWorld/HelloWorld.scss +10 -10
  16. package/templates/lib/src/components/sfc-setup/index.vue +8 -8
  17. package/templates/plugin/.editorconfig +9 -0
  18. package/templates/plugin/README.md +35 -0
  19. package/templates/plugin/eslint.config.js +6 -0
  20. package/templates/plugin/gitignore +36 -0
  21. package/templates/plugin/package.json +45 -0
  22. package/templates/plugin/plugin/components/hello-component/index.vue +174 -0
  23. package/templates/plugin/plugin/components/native-meter/index.json +6 -0
  24. package/templates/plugin/plugin/components/native-meter/index.scss +51 -0
  25. package/templates/plugin/plugin/components/native-meter/index.ts +28 -0
  26. package/templates/plugin/plugin/components/native-meter/index.wxml +12 -0
  27. package/templates/plugin/plugin/index.ts +16 -0
  28. package/templates/plugin/plugin/pages/hello-page/index.vue +332 -0
  29. package/templates/plugin/plugin/pages/native-playground/index.json +7 -0
  30. package/templates/plugin/plugin/pages/native-playground/index.scss +81 -0
  31. package/templates/plugin/plugin/pages/native-playground/index.ts +20 -0
  32. package/templates/plugin/plugin/pages/native-playground/index.wxml +30 -0
  33. package/templates/plugin/plugin/plugin.json +11 -0
  34. package/templates/plugin/plugin/utils/showcase.ts +102 -0
  35. package/templates/plugin/project.config.json +48 -0
  36. package/templates/plugin/project.private.config.json +8 -0
  37. package/templates/plugin/shared/shared-data.ts +12 -0
  38. package/templates/plugin/src/app.json +11 -0
  39. package/templates/plugin/src/app.ts +5 -0
  40. package/templates/plugin/src/pages/index/index.json +6 -0
  41. package/templates/plugin/src/pages/index/index.ts +46 -0
  42. package/templates/plugin/src/pages/index/index.wxml +46 -0
  43. package/templates/plugin/src/pages/index/index.wxss +113 -0
  44. package/templates/plugin/src/sitemap.json +7 -0
  45. package/templates/plugin/stylelint.config.js +5 -0
  46. package/templates/plugin/tsconfig.json +17 -0
  47. package/templates/plugin/weapp-vite.config.ts +23 -0
  48. package/templates/tailwindcss/eslint.config.js +4 -1
  49. package/templates/tailwindcss/package.json +3 -2
  50. package/templates/tailwindcss/postcss.config.js +1 -2
  51. package/templates/tailwindcss/src/app.css +2 -0
  52. package/templates/tailwindcss/src/pages/index/index.scss +1 -0
  53. package/templates/tailwindcss/src/pages/profile/index.scss +1 -0
  54. package/templates/tailwindcss/tailwind.config.ts +0 -5
  55. package/templates/tailwindcss/weapp-vite.config.ts +2 -0
  56. package/templates/tdesign/eslint.config.js +4 -1
  57. package/templates/tdesign/package.json +3 -2
  58. package/templates/tdesign/postcss.config.js +1 -2
  59. package/templates/tdesign/src/app.css +2 -0
  60. package/templates/tdesign/src/pages/index/index.scss +1 -0
  61. package/templates/tdesign/tailwind.config.ts +0 -5
  62. package/templates/tdesign/weapp-vite.config.ts +2 -0
  63. package/templates/vant/eslint.config.js +4 -1
  64. package/templates/vant/package.json +3 -2
  65. package/templates/vant/postcss.config.js +1 -2
  66. package/templates/vant/src/app.css +2 -0
  67. package/templates/vant/src/pages/index/index.scss +1 -0
  68. package/templates/vant/tailwind.config.ts +0 -5
  69. package/templates/vant/weapp-vite.config.ts +2 -0
  70. package/templates/wevu/eslint.config.js +1 -1
  71. package/templates/wevu/package.json +1 -0
  72. package/templates/wevu-tdesign/eslint.config.js +13 -1
  73. package/templates/wevu-tdesign/package.json +3 -2
  74. package/templates/wevu-tdesign/postcss.config.js +1 -2
  75. package/templates/wevu-tdesign/src/app.css +7 -0
  76. package/templates/wevu-tdesign/src/app.vue +1 -10
  77. package/templates/wevu-tdesign/tailwind.config.ts +0 -5
  78. package/templates/wevu-tdesign/weapp-vite.config.ts +1 -0
  79. package/templates/tailwindcss/src/app.scss +0 -3
  80. package/templates/tdesign/src/app.scss +0 -3
  81. package/templates/vant/src/app.scss +0 -3
@@ -2,5 +2,8 @@ import { icebreaker } from '@icebreakers/eslint-config'
2
2
 
3
3
  export default icebreaker({
4
4
  miniProgram: true,
5
- ignores: ['CHANGELOG.md', 'README.md', '.turbo/**'],
5
+ tailwindcss: {
6
+ entryPoint: './src/app.css',
7
+ },
8
+ ignores: ['CHANGELOG.md', 'README.md', '.turbo/**', 'dist/**', '.weapp-vite/**'],
6
9
  })
@@ -35,13 +35,14 @@
35
35
  "@icebreakers/eslint-config": "catalog:",
36
36
  "@icebreakers/stylelint-config": "catalog:",
37
37
  "@iconify-json/mdi": "catalog:",
38
- "autoprefixer": "catalog:",
38
+ "@tailwindcss/postcss": "catalog:",
39
+ "@types/node": "catalog:",
39
40
  "eslint": "catalog:",
40
41
  "miniprogram-api-typings": "catalog:",
41
42
  "postcss": "catalog:",
42
43
  "sass": "catalog:",
43
44
  "stylelint": "catalog:",
44
- "tailwindcss": "catalog:tailwind3",
45
+ "tailwindcss": "catalog:tailwind4",
45
46
  "typescript": "catalog:",
46
47
  "weapp-tailwindcss": "catalog:",
47
48
  "weapp-vite": "workspace:*",
@@ -1,6 +1,5 @@
1
1
  export default {
2
2
  plugins: {
3
- tailwindcss: {},
4
- autoprefixer: {},
3
+ '@tailwindcss/postcss': {},
5
4
  },
6
5
  }
@@ -0,0 +1,2 @@
1
+ @import 'tailwindcss';
2
+ @config "../tailwind.config.ts";
@@ -0,0 +1 @@
1
+ /* empty */
@@ -14,9 +14,4 @@ export default {
14
14
  collections: getIconCollections(['mdi']),
15
15
  }),
16
16
  ],
17
- corePlugins: {
18
- // 小程序不需要 preflight 和 container,因为这主要是给 h5 的,如果你要同时开发小程序和 h5 端,你应该使用环境变量来控制它
19
- preflight: false,
20
- container: false,
21
- },
22
17
  } satisfies Config
@@ -1,3 +1,4 @@
1
+ import path from 'node:path'
1
2
  import { weappTailwindcss } from 'weapp-tailwindcss/vite'
2
3
  import { defineConfig } from 'weapp-vite'
3
4
  import { VantResolver } from 'weapp-vite/auto-import-components/resolvers'
@@ -45,6 +46,7 @@ export default defineConfig({
45
46
  plugins: [
46
47
  weappTailwindcss({
47
48
  rem2rpx: true,
49
+ cssEntries: [path.resolve(import.meta.dirname, 'src/app.css')],
48
50
  }),
49
51
  ],
50
52
  })
@@ -3,5 +3,5 @@ import { icebreaker } from '@icebreakers/eslint-config'
3
3
  export default icebreaker({
4
4
  miniProgram: true,
5
5
  vue: true,
6
- ignores: ['CHANGELOG.md', 'README.md', '.turbo/**'],
6
+ ignores: ['CHANGELOG.md', 'README.md', '.turbo/**', 'dist/**', '.weapp-vite/**'],
7
7
  })
@@ -30,6 +30,7 @@
30
30
  "devDependencies": {
31
31
  "@icebreakers/eslint-config": "catalog:",
32
32
  "@icebreakers/stylelint-config": "catalog:",
33
+ "@types/node": "catalog:",
33
34
  "eslint": "catalog:",
34
35
  "miniprogram-api-typings": "catalog:",
35
36
  "stylelint": "catalog:",
@@ -3,5 +3,17 @@ import { icebreaker } from '@icebreakers/eslint-config'
3
3
  export default icebreaker({
4
4
  miniProgram: true,
5
5
  vue: true,
6
- ignores: ['CHANGELOG.md', 'README.md', '.turbo/**'],
6
+ tailwindcss: {
7
+ entryPoint: './src/app.css',
8
+ },
9
+ ignores: ['CHANGELOG.md', 'README.md', '.turbo/**', 'dist/**', '.weapp-vite/**'],
10
+ }, {
11
+ files: ['src/**/*.{ts,vue}'],
12
+ rules: {
13
+ 'better-tailwindcss/enforce-canonical-classes': 'off',
14
+ 'better-tailwindcss/enforce-consistent-class-order': 'off',
15
+ 'better-tailwindcss/enforce-consistent-line-wrapping': 'off',
16
+ 'better-tailwindcss/no-conflicting-classes': 'off',
17
+ 'better-tailwindcss/no-unknown-classes': 'off',
18
+ },
7
19
  })
@@ -35,13 +35,14 @@
35
35
  "@icebreakers/eslint-config": "catalog:",
36
36
  "@icebreakers/stylelint-config": "catalog:",
37
37
  "@iconify-json/mdi": "catalog:",
38
- "autoprefixer": "catalog:",
38
+ "@tailwindcss/postcss": "catalog:",
39
+ "@types/node": "catalog:",
39
40
  "eslint": "catalog:",
40
41
  "miniprogram-api-typings": "catalog:",
41
42
  "postcss": "catalog:",
42
43
  "sass": "catalog:",
43
44
  "stylelint": "catalog:",
44
- "tailwindcss": "catalog:tailwind3",
45
+ "tailwindcss": "catalog:tailwind4",
45
46
  "typescript": "catalog:",
46
47
  "vue-tsc": "catalog:",
47
48
  "weapp-tailwindcss": "catalog:",
@@ -1,6 +1,5 @@
1
1
  export default {
2
2
  plugins: {
3
- tailwindcss: {},
4
- autoprefixer: {},
3
+ '@tailwindcss/postcss': {},
5
4
  },
6
5
  }
@@ -0,0 +1,7 @@
1
+ @import 'tailwindcss';
2
+ @config "../tailwind.config.ts";
3
+
4
+ page {
5
+ font-family: 'HarmonyOS Sans', 'PingFang SC', 'Microsoft YaHei', sans-serif;
6
+ background-color: #f6f7fb;
7
+ }
@@ -87,13 +87,4 @@ onLaunch(() => {
87
87
  })
88
88
  </script>
89
89
 
90
- <style>
91
- @tailwind base;
92
- @tailwind components;
93
- @tailwind utilities;
94
-
95
- page {
96
- font-family: 'HarmonyOS Sans', 'PingFang SC', 'Microsoft YaHei', sans-serif;
97
- background-color: #f6f7fb;
98
- }
99
- </style>
90
+ <style src="./app.css"></style>
@@ -14,9 +14,4 @@ export default {
14
14
  collections: getIconCollections(['mdi']),
15
15
  }),
16
16
  ],
17
- corePlugins: {
18
- // 小程序不需要 preflight 和 container,因为这主要是给 h5 的,如果你要同时开发小程序和 h5 端,你应该使用环境变量来控制它
19
- preflight: false,
20
- container: false,
21
- },
22
17
  } satisfies Config
@@ -66,6 +66,7 @@ export default defineConfig({
66
66
  plugins: [
67
67
  weappTailwindcss({
68
68
  rem2rpx: true,
69
+ cssEntries: [path.resolve(import.meta.dirname, 'src/app.css')],
69
70
  }),
70
71
  ],
71
72
  })
@@ -1,3 +0,0 @@
1
- @use 'tailwindcss/base';
2
- @use 'tailwindcss/components';
3
- @use 'tailwindcss/utilities';
@@ -1,3 +0,0 @@
1
- @use 'tailwindcss/base';
2
- @use 'tailwindcss/components';
3
- @use 'tailwindcss/utilities';
@@ -1,3 +0,0 @@
1
- @use 'tailwindcss/base';
2
- @use 'tailwindcss/components';
3
- @use 'tailwindcss/utilities';