create-uni-app-tailwindcss 0.1.2 → 0.1.4
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/templates/default/.vscode/extensions.json +7 -0
- package/dist/templates/default/.vscode/settings.json +100 -0
- package/dist/templates/default/.vscode/tailwind.json +56 -0
- package/dist/templates/default/README.md +10 -4
- package/dist/templates/default/_npmrc +1 -3
- package/dist/templates/default/eslint.config.mjs +15 -1
- package/dist/templates/default/package.json +40 -37
- package/dist/templates/default/src/App.vue +2 -10
- package/dist/templates/default/src/auto-imports.d.ts +2 -0
- package/dist/templates/default/src/pages/index/index.vue +0 -4
- package/dist/templates/registry.json +4 -1
- package/package.json +5 -5
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
{
|
|
2
|
+
// Disable the default formatter, use eslint instead
|
|
3
|
+
"prettier.enable": false,
|
|
4
|
+
"editor.formatOnSave": false,
|
|
5
|
+
// Auto fix
|
|
6
|
+
"editor.codeActionsOnSave": {
|
|
7
|
+
"source.fixAll.eslint": "explicit",
|
|
8
|
+
"source.organizeImports": "never"
|
|
9
|
+
},
|
|
10
|
+
// Reuse diagnostics collected while editing instead of linting the whole file again on save.
|
|
11
|
+
"eslint.codeActionsOnSave.mode": "problems",
|
|
12
|
+
// This is a single-package workspace; keep config and dependency resolution at its root.
|
|
13
|
+
"eslint.workingDirectories": [
|
|
14
|
+
{
|
|
15
|
+
"mode": "location"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
// https://github.com/tailwindlabs/tailwindcss/discussions/5258
|
|
19
|
+
"css.customData": [
|
|
20
|
+
".vscode/tailwind.json"
|
|
21
|
+
],
|
|
22
|
+
"tailwindCSS.experimental.classRegex": [
|
|
23
|
+
// https://github.com/lukeed/clsx?tab=readme-ov-file#tailwind-support
|
|
24
|
+
[
|
|
25
|
+
"clsx\\(([^)]*)\\)",
|
|
26
|
+
"(?:'|\"|`)([^']*)(?:'|\"|`)"
|
|
27
|
+
],
|
|
28
|
+
// https://cva.style/docs/getting-started/installation
|
|
29
|
+
[
|
|
30
|
+
"cva\\(([^)]*)\\)",
|
|
31
|
+
"[\"'`]([^\"'`]*).*?[\"'`]"
|
|
32
|
+
],
|
|
33
|
+
[
|
|
34
|
+
"cx\\(([^)]*)\\)",
|
|
35
|
+
"(?:'|\"|`)([^']*)(?:'|\"|`)"
|
|
36
|
+
]
|
|
37
|
+
],
|
|
38
|
+
// Mini Program rpx arbitrary text sizes, for example text-[24rpx],
|
|
39
|
+
// can be misreported as conflicting with text color utilities.
|
|
40
|
+
"tailwindCSS.lint.cssConflict": "ignore",
|
|
41
|
+
// Silent the stylistic rules in you IDE, but still auto fix them
|
|
42
|
+
"eslint.rules.customizations": [
|
|
43
|
+
{
|
|
44
|
+
"rule": "style/*",
|
|
45
|
+
"severity": "off"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"rule": "format/*",
|
|
49
|
+
"severity": "off"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"rule": "*-indent",
|
|
53
|
+
"severity": "off"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"rule": "*-spacing",
|
|
57
|
+
"severity": "off"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"rule": "*-spaces",
|
|
61
|
+
"severity": "off"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"rule": "*-order",
|
|
65
|
+
"severity": "off"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"rule": "*-dangle",
|
|
69
|
+
"severity": "off"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"rule": "*-newline",
|
|
73
|
+
"severity": "off"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"rule": "*quotes",
|
|
77
|
+
"severity": "off"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"rule": "*semi",
|
|
81
|
+
"severity": "off"
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
// Validate source languages only. Stylelint owns CSS/SCSS in the editor.
|
|
85
|
+
"eslint.validate": [
|
|
86
|
+
"javascript",
|
|
87
|
+
"javascriptreact",
|
|
88
|
+
"typescript",
|
|
89
|
+
"typescriptreact",
|
|
90
|
+
"vue"
|
|
91
|
+
],
|
|
92
|
+
"css.validate": false,
|
|
93
|
+
"less.validate": false,
|
|
94
|
+
"scss.validate": false,
|
|
95
|
+
"stylelint.validate": [
|
|
96
|
+
"vue",
|
|
97
|
+
"css",
|
|
98
|
+
"scss"
|
|
99
|
+
]
|
|
100
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// https://github.com/tailwindlabs/tailwindcss/discussions/5258
|
|
2
|
+
{
|
|
3
|
+
"version": 1.1,
|
|
4
|
+
"atDirectives": [
|
|
5
|
+
{
|
|
6
|
+
"name": "@tailwind",
|
|
7
|
+
"description": "Use the `@tailwind` directive to insert Tailwind's `base`, `components`, `utilities` and `screens` styles into your CSS.",
|
|
8
|
+
"references": [
|
|
9
|
+
{
|
|
10
|
+
"name": "Tailwind Documentation",
|
|
11
|
+
"url": "https://tailwindcss.com/docs/functions-and-directives#tailwind"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"name": "@apply",
|
|
17
|
+
"description": "Use the `@apply` directive to inline any existing utility classes into your own custom CSS. This is useful when you find a common utility pattern in your HTML that you’d like to extract to a new component.",
|
|
18
|
+
"references": [
|
|
19
|
+
{
|
|
20
|
+
"name": "Tailwind Documentation",
|
|
21
|
+
"url": "https://tailwindcss.com/docs/functions-and-directives#apply"
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "@responsive",
|
|
27
|
+
"description": "You can generate responsive variants of your own classes by wrapping their definitions in the `@responsive` directive:\n```css\n@responsive {\n .alert {\n background-color: #E53E3E;\n }\n}\n```\n",
|
|
28
|
+
"references": [
|
|
29
|
+
{
|
|
30
|
+
"name": "Tailwind Documentation",
|
|
31
|
+
"url": "https://tailwindcss.com/docs/functions-and-directives#responsive"
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "@screen",
|
|
37
|
+
"description": "The `@screen` directive allows you to create media queries that reference your breakpoints by **name** instead of duplicating their values in your own CSS:\n```css\n@screen sm {\n /* ... */\n}\n```\n…gets transformed into this:\n```css\n@media (min-width: 640px) {\n /* ... */\n}\n```\n",
|
|
38
|
+
"references": [
|
|
39
|
+
{
|
|
40
|
+
"name": "Tailwind Documentation",
|
|
41
|
+
"url": "https://tailwindcss.com/docs/functions-and-directives#screen"
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "@variants",
|
|
47
|
+
"description": "Generate `hover`, `focus`, `active` and other **variants** of your own utilities by wrapping their definitions in the `@variants` directive:\n```css\n@variants hover, focus {\n .btn-brand {\n background-color: #3182CE;\n }\n}\n```\n",
|
|
48
|
+
"references": [
|
|
49
|
+
{
|
|
50
|
+
"name": "Tailwind Documentation",
|
|
51
|
+
"url": "https://tailwindcss.com/docs/functions-and-directives#variants"
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
- `Vue 3`
|
|
16
16
|
- `Tailwind CSS v4`
|
|
17
17
|
- `weapp-tailwindcss`
|
|
18
|
-
- `pnpm`
|
|
18
|
+
- `pnpm 12.8.1`
|
|
19
19
|
|
|
20
20
|
> 当前主分支是 `tailwindcss@4` 版本;如果需要 `tailwindcss@3` 版本,请切换到 `tailwindcss@3` 分支。
|
|
21
21
|
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
|
|
33
33
|
## 使用前提
|
|
34
34
|
|
|
35
|
-
- Node.js `
|
|
36
|
-
- `pnpm`
|
|
35
|
+
- Node.js `^22.18.0 || >=24.11.0`
|
|
36
|
+
- `pnpm 12.8.1`
|
|
37
37
|
- 微信开发者工具,用于微信小程序
|
|
38
38
|
- HBuilderX `5.0+`,用于 Android 和 iOS App 调试
|
|
39
39
|
- Android SDK、模拟器或已开启调试的 Android 设备
|
|
@@ -134,7 +134,13 @@ pnpm update:deps
|
|
|
134
134
|
pnpm update:uni-app
|
|
135
135
|
```
|
|
136
136
|
|
|
137
|
-
uni-app 的兼容性集合不仅包括 `@dcloudio/*`,还包括 `vue`、`vue-i18n`、`@vue/runtime-core`、`@vue/shared`、`vite` 和 `rollup`。不要用通用更新命令单独升级这些包;`update:uni-app` 会通过 UVM
|
|
137
|
+
uni-app 的兼容性集合不仅包括 `@dcloudio/*`,还包括 `vue`、`vue-i18n`、`@vue/runtime-core`、`@vue/shared`、`pinia`、`vite` 和 `rollup`。不要用通用更新命令单独升级这些包;`update:uni-app` 会通过 UVM 更新编译器相关版本;Pinia 需另外核对跨端 Vue 运行时要求。
|
|
138
|
+
|
|
139
|
+
### 当前依赖兼容边界
|
|
140
|
+
|
|
141
|
+
当前正式版 uni-app 为 `3.0.0-5020620260917001`。Vue、`@vue/runtime-core` 和 `@vue/shared` 固定为 `3.4.21`,与 DCloud 内置编译器及 `@vue/server-renderer` 保持一致;Vite `5.2.8`、Rollup `4.14.3` 沿用官方 UVM 配置。Pinia 保留 `2.2.4`,因为 Pinia 4 要求 Vue `^3.5.11`,高于当前跨端运行时版本。
|
|
142
|
+
|
|
143
|
+
TypeScript 保留 `6.0.3`,仓库发布工具 repoctl 当前声明支持 TypeScript 5/6。Node.js 要求 `^22.18.0 || >=24.11.0`,与 weapp-tailwindcss 5.5.11 的运行要求一致。升级时先通过 `pnpm dlx @dcloudio/uvm@latest latest --manager manual` 查看正式版组合,再执行 `pnpm update:uni-app` 并核对这些兼容约束。
|
|
138
144
|
|
|
139
145
|
## 项目级技能
|
|
140
146
|
|
|
@@ -6,7 +6,8 @@ export default icebreaker(
|
|
|
6
6
|
betterTailwindcss: {
|
|
7
7
|
entryPoint: './src/tailwind.css',
|
|
8
8
|
},
|
|
9
|
-
|
|
9
|
+
// This template uses uni-app, not the Wevu runtime targeted by miniProgram.
|
|
10
|
+
miniProgram: false,
|
|
10
11
|
},
|
|
11
12
|
{
|
|
12
13
|
ignores: [
|
|
@@ -24,4 +25,17 @@ export default icebreaker(
|
|
|
24
25
|
'better-tailwindcss/no-unknown-classes': 'off',
|
|
25
26
|
},
|
|
26
27
|
},
|
|
28
|
+
{
|
|
29
|
+
files: ['src/**/*.{js,ts,vue}'],
|
|
30
|
+
languageOptions: {
|
|
31
|
+
globals: {
|
|
32
|
+
uni: 'readonly',
|
|
33
|
+
wx: 'readonly',
|
|
34
|
+
my: 'readonly',
|
|
35
|
+
tt: 'readonly',
|
|
36
|
+
getApp: 'readonly',
|
|
37
|
+
getCurrentPages: 'readonly',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
27
41
|
)
|
|
@@ -2,10 +2,13 @@
|
|
|
2
2
|
"name": "uni-app-tailwindcss-template-default",
|
|
3
3
|
"version": "0.0.0",
|
|
4
4
|
"private": true,
|
|
5
|
-
"packageManager": "pnpm@
|
|
5
|
+
"packageManager": "pnpm@12.8.1",
|
|
6
6
|
"imports": {
|
|
7
7
|
"#tailwind.css": "./src/tailwind.css"
|
|
8
8
|
},
|
|
9
|
+
"engines": {
|
|
10
|
+
"node": "^22.18.0 || >=24.11.0"
|
|
11
|
+
},
|
|
9
12
|
"scripts": {
|
|
10
13
|
"dev": "uni -p mp-weixin",
|
|
11
14
|
"build": "pnpm build:mp-weixin",
|
|
@@ -46,56 +49,56 @@
|
|
|
46
49
|
"upload:build": "weapp upload -p dist/build/mp-weixin -v 1.0.0 -d \"release version\"",
|
|
47
50
|
"lint": "eslint .",
|
|
48
51
|
"lint:fix": "eslint ./src --fix",
|
|
49
|
-
"update:deps": "pnpm up --latest --interactive \"!@dcloudio/*\" \"!@vue/runtime-core\" \"!@vue/shared\" \"!rollup\" \"!vite\" \"!vue\" \"!vue-i18n\"",
|
|
52
|
+
"update:deps": "pnpm up --latest --interactive \"!@dcloudio/*\" \"!@vue/runtime-core\" \"!@vue/shared\" \"!pinia\" \"!rollup\" \"!vite\" \"!vue\" \"!vue-i18n\"",
|
|
50
53
|
"update:uni-app": "pnpm dlx @dcloudio/uvm@latest --manager pnpm"
|
|
51
54
|
},
|
|
52
55
|
"dependencies": {
|
|
53
|
-
"@dcloudio/uni-app": "3.0.0-
|
|
54
|
-
"@dcloudio/uni-app-harmony": "3.0.0-
|
|
55
|
-
"@dcloudio/uni-app-plus": "3.0.0-
|
|
56
|
-
"@dcloudio/uni-components": "3.0.0-
|
|
57
|
-
"@dcloudio/uni-h5": "3.0.0-
|
|
58
|
-
"@dcloudio/uni-mp-alipay": "3.0.0-
|
|
59
|
-
"@dcloudio/uni-mp-baidu": "3.0.0-
|
|
60
|
-
"@dcloudio/uni-mp-harmony": "3.0.0-
|
|
61
|
-
"@dcloudio/uni-mp-jd": "3.0.0-
|
|
62
|
-
"@dcloudio/uni-mp-kuaishou": "3.0.0-
|
|
63
|
-
"@dcloudio/uni-mp-lark": "3.0.0-
|
|
64
|
-
"@dcloudio/uni-mp-qq": "3.0.0-
|
|
65
|
-
"@dcloudio/uni-mp-toutiao": "3.0.0-
|
|
66
|
-
"@dcloudio/uni-mp-weixin": "3.0.0-
|
|
67
|
-
"@dcloudio/uni-mp-xhs": "3.0.0-
|
|
68
|
-
"@dcloudio/uni-quickapp-webview": "3.0.0-
|
|
56
|
+
"@dcloudio/uni-app": "3.0.0-5020620260917001",
|
|
57
|
+
"@dcloudio/uni-app-harmony": "3.0.0-5020620260917001",
|
|
58
|
+
"@dcloudio/uni-app-plus": "3.0.0-5020620260917001",
|
|
59
|
+
"@dcloudio/uni-components": "3.0.0-5020620260917001",
|
|
60
|
+
"@dcloudio/uni-h5": "3.0.0-5020620260917001",
|
|
61
|
+
"@dcloudio/uni-mp-alipay": "3.0.0-5020620260917001",
|
|
62
|
+
"@dcloudio/uni-mp-baidu": "3.0.0-5020620260917001",
|
|
63
|
+
"@dcloudio/uni-mp-harmony": "3.0.0-5020620260917001",
|
|
64
|
+
"@dcloudio/uni-mp-jd": "3.0.0-5020620260917001",
|
|
65
|
+
"@dcloudio/uni-mp-kuaishou": "3.0.0-5020620260917001",
|
|
66
|
+
"@dcloudio/uni-mp-lark": "3.0.0-5020620260917001",
|
|
67
|
+
"@dcloudio/uni-mp-qq": "3.0.0-5020620260917001",
|
|
68
|
+
"@dcloudio/uni-mp-toutiao": "3.0.0-5020620260917001",
|
|
69
|
+
"@dcloudio/uni-mp-weixin": "3.0.0-5020620260917001",
|
|
70
|
+
"@dcloudio/uni-mp-xhs": "3.0.0-5020620260917001",
|
|
71
|
+
"@dcloudio/uni-quickapp-webview": "3.0.0-5020620260917001",
|
|
69
72
|
"@vue/shared": "3.4.21",
|
|
70
|
-
"@weapp-tailwindcss/merge": "^2.2.
|
|
73
|
+
"@weapp-tailwindcss/merge": "^2.2.6",
|
|
71
74
|
"pinia": "2.2.4",
|
|
72
|
-
"vue": "
|
|
73
|
-
"vue-i18n": "^9.
|
|
75
|
+
"vue": "3.4.21",
|
|
76
|
+
"vue-i18n": "^9.14.5"
|
|
74
77
|
},
|
|
75
78
|
"devDependencies": {
|
|
76
79
|
"@dcloudio/hbuilderx-cli": "^1.2.0",
|
|
77
|
-
"@dcloudio/types": "
|
|
78
|
-
"@dcloudio/uni-cli-shared": "3.0.0-
|
|
79
|
-
"@dcloudio/uni-stacktracey": "3.0.0-
|
|
80
|
-
"@dcloudio/vite-plugin-uni": "3.0.0-
|
|
81
|
-
"@icebreakers/eslint-config": "^
|
|
82
|
-
"@icebreakers/stylelint-config": "^5.
|
|
80
|
+
"@dcloudio/types": "3.4.31",
|
|
81
|
+
"@dcloudio/uni-cli-shared": "3.0.0-5020620260917001",
|
|
82
|
+
"@dcloudio/uni-stacktracey": "3.0.0-5020620260917001",
|
|
83
|
+
"@dcloudio/vite-plugin-uni": "3.0.0-5020620260917001",
|
|
84
|
+
"@icebreakers/eslint-config": "^8.0.6",
|
|
85
|
+
"@icebreakers/stylelint-config": "^5.1.3",
|
|
83
86
|
"@iconify-json/mdi": "^1.2.3",
|
|
84
87
|
"@iconify-json/svg-spinners": "^1.2.4",
|
|
85
88
|
"@iconify/tailwind4": "^1.2.3",
|
|
86
|
-
"@types/node": "^26.
|
|
87
|
-
"@vue/runtime-core": "
|
|
88
|
-
"autoprefixer": "^10.
|
|
89
|
-
"eslint": "^10.
|
|
90
|
-
"postcss": "^8.5.
|
|
89
|
+
"@types/node": "^26.6.3",
|
|
90
|
+
"@vue/runtime-core": "3.4.21",
|
|
91
|
+
"autoprefixer": "^10.6.1",
|
|
92
|
+
"eslint": "^10.11.0",
|
|
93
|
+
"postcss": "^8.5.28",
|
|
91
94
|
"rollup": "4.14.3",
|
|
92
|
-
"sass": "^1.
|
|
93
|
-
"stylelint": "^17.
|
|
95
|
+
"sass": "^1.105.1",
|
|
96
|
+
"stylelint": "^17.15.0",
|
|
94
97
|
"tailwindcss": "^4.3.3",
|
|
95
98
|
"typescript": "^6.0.3",
|
|
96
|
-
"unplugin-auto-import": "^
|
|
99
|
+
"unplugin-auto-import": "^21.1.0",
|
|
97
100
|
"vite": "5.2.8",
|
|
98
|
-
"weapp-ide-cli": "^6.
|
|
99
|
-
"weapp-tailwindcss": "^5.
|
|
101
|
+
"weapp-ide-cli": "^6.1.9",
|
|
102
|
+
"weapp-tailwindcss": "^5.5.11"
|
|
100
103
|
}
|
|
101
104
|
}
|
|
@@ -5,10 +5,6 @@ import GradientFeature from '@/components/sections/GradientFeature.vue'
|
|
|
5
5
|
import HeroShowcase from '@/components/sections/HeroShowcase.vue'
|
|
6
6
|
import IconGallery from '@/components/sections/IconGallery.vue'
|
|
7
7
|
import MacroShowcase from '@/components/sections/MacroShowcase.vue'
|
|
8
|
-
|
|
9
|
-
onLoad(() => {
|
|
10
|
-
console.log('欢迎使用 wx / not-wx 变量示例模板')
|
|
11
|
-
})
|
|
12
8
|
</script>
|
|
13
9
|
|
|
14
10
|
<template>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-uni-app-tailwindcss",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Create a uni-app project with Vite, Vue 3, Tailwind CSS, and weapp-tailwindcss.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"create-app"
|
|
25
25
|
],
|
|
26
26
|
"engines": {
|
|
27
|
-
"node": ">=
|
|
27
|
+
"node": "^22.18.0 || >=24.11.0"
|
|
28
28
|
},
|
|
29
29
|
"bin": {
|
|
30
30
|
"create-uni-app-tailwindcss": "./dist/cli.js"
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
"prompts": "^2.4.2"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@playwright/test": "^1.
|
|
45
|
-
"@types/node": "^26.
|
|
44
|
+
"@playwright/test": "^1.63.0",
|
|
45
|
+
"@types/node": "^26.6.3",
|
|
46
46
|
"@types/prompts": "^2.4.9",
|
|
47
|
-
"tsup": "^8.5.
|
|
47
|
+
"tsup": "^8.5.1",
|
|
48
48
|
"typescript": "^6.0.3"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|