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 CHANGED
@@ -101,12 +101,23 @@ my-project/
101
101
 
102
102
  ```vue
103
103
  <script setup>
104
- import { HTable, ModuleTitle } from 'cmpt-huitu-ui'
104
+ import { HTable, VexTable, HtDialog } from 'cmpt-huitu-ui'
105
105
  </script>
106
106
 
107
107
  <template>
108
- <ModuleTitle title="模块标题" />
109
- <HTable :data="tableData" />
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cmpt-huitu-cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "type": "module",
5
5
  "description": "慧图前端项目工程化 CLI 工具",
6
6
  "main": "index.js",
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 时会自动安装 @huitu/ui 和 @huitu/utils\n'))
134
+ console.log(chalk.yellow(' - 运行 npm install 时会自动安装 cmpt-huitu-ui 和 cmpt-huitu-utils\n'))
127
135
  }
Binary file