cmpt-huitu-cli 1.0.0 → 1.0.2
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/README.md +14 -4
- package/package.json +1 -1
- package/src/create.js +9 -1
- package/templates/.DS_Store +0 -0
- package/templates/default/.lingma/rules/project-rules.md +711 -0
- package/templates/default/.qoder/rules/project-rules.md +715 -0
- package/templates/default/.trae/rules/project-rules.md +711 -0
- package/templates/default/README.md +6 -6
- package/templates/default/src/components.d.ts +3 -3
- package/templates/default/src/main.js +1 -1
- package/templates/default/src/routers/base.js +4 -4
- package/templates/default/src/styles/index.scss +6 -6
- package/templates/default/src/styles/theme/README.md +5 -5
- package/templates/default/src/utils/auth.js +1 -1
- package/templates/default/src/utils/requestAxios.js +1 -1
- package/templates/default/src/utils/theme.js +1 -1
- package/templates/default/src/views/{Home.vue → home.vue} +5 -20
- package/templates/default/vite.config.js +18 -4
- /package/templates/default/src/{App.vue → app.vue} +0 -0
- /package/templates/default/src/components/error/{Error.vue → error.vue} +0 -0
- /package/templates/default/src/views/{About.vue → about.vue} +0 -0
package/README.md
CHANGED
|
@@ -101,12 +101,23 @@ my-project/
|
|
|
101
101
|
|
|
102
102
|
```vue
|
|
103
103
|
<script setup>
|
|
104
|
-
import { HTable,
|
|
104
|
+
import { HTable, VexTable, HtDialog } from 'cmpt-huitu-ui'
|
|
105
105
|
</script>
|
|
106
106
|
|
|
107
107
|
<template>
|
|
108
|
-
<
|
|
109
|
-
|
|
108
|
+
<HTable
|
|
109
|
+
:data="tableData"
|
|
110
|
+
:columns="columns"
|
|
111
|
+
/>
|
|
112
|
+
<VexTable
|
|
113
|
+
:data="tableData"
|
|
114
|
+
:columns="columns"
|
|
115
|
+
/>
|
|
116
|
+
<HtDialog
|
|
117
|
+
v-model="visible"
|
|
118
|
+
title="对话框"
|
|
119
|
+
>内容</HtDialog
|
|
120
|
+
>
|
|
110
121
|
</template>
|
|
111
122
|
```
|
|
112
123
|
|
|
@@ -166,4 +177,3 @@ proxy: {
|
|
|
166
177
|
## 📄 许可证
|
|
167
178
|
|
|
168
179
|
ISC
|
|
169
|
-
|
package/package.json
CHANGED
package/src/create.js
CHANGED
|
@@ -91,6 +91,7 @@ export async function create(projectName, targetDir) {
|
|
|
91
91
|
// 将 workspace 协议改为具体版本号(从 npm 安装)
|
|
92
92
|
// 使用语义化版本范围(如 ^1.0.0),允许小版本和补丁版本更新
|
|
93
93
|
if (pkg.dependencies) {
|
|
94
|
+
// 处理旧包名(向后兼容)
|
|
94
95
|
if (pkg.dependencies['@huitu/ui'] === 'workspace:*') {
|
|
95
96
|
pkg.dependencies['cmpt-huitu-ui'] = getDependencyVersion('cmpt-huitu-ui')
|
|
96
97
|
delete pkg.dependencies['@huitu/ui']
|
|
@@ -99,6 +100,13 @@ export async function create(projectName, targetDir) {
|
|
|
99
100
|
pkg.dependencies['cmpt-huitu-utils'] = getDependencyVersion('cmpt-huitu-utils')
|
|
100
101
|
delete pkg.dependencies['@huitu/utils']
|
|
101
102
|
}
|
|
103
|
+
// 处理新包名
|
|
104
|
+
if (pkg.dependencies['cmpt-huitu-ui'] === 'workspace:*') {
|
|
105
|
+
pkg.dependencies['cmpt-huitu-ui'] = getDependencyVersion('cmpt-huitu-ui')
|
|
106
|
+
}
|
|
107
|
+
if (pkg.dependencies['cmpt-huitu-utils'] === 'workspace:*') {
|
|
108
|
+
pkg.dependencies['cmpt-huitu-utils'] = getDependencyVersion('cmpt-huitu-utils')
|
|
109
|
+
}
|
|
102
110
|
}
|
|
103
111
|
|
|
104
112
|
await fs.writeJson(pkgPath, pkg, { spaces: 2 })
|
|
@@ -123,5 +131,5 @@ export async function create(projectName, targetDir) {
|
|
|
123
131
|
console.log('')
|
|
124
132
|
console.log(chalk.yellow('💡 提示:'))
|
|
125
133
|
console.log(chalk.yellow(' - 如果使用私有 npm 仓库,请先配置正确的 registry'))
|
|
126
|
-
console.log(chalk.yellow(' - 运行 npm install 时会自动安装
|
|
134
|
+
console.log(chalk.yellow(' - 运行 npm install 时会自动安装 cmpt-huitu-ui 和 cmpt-huitu-utils\n'))
|
|
127
135
|
}
|
|
Binary file
|