done-coding-component 0.4.11 → 0.5.0
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 +13 -3
- package/es/cli.mjs +1 -1
- package/es/{index-c59b8101.js → index-1a8fe9cd.js} +1 -1
- package/es/index.mjs +2 -2
- package/package.json +6 -6
- package/types/index.d.ts +1 -1
package/README.md
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
## 安装
|
|
9
9
|
|
|
10
10
|
### 独立安装
|
|
11
|
+
|
|
11
12
|
```bash
|
|
12
13
|
npm install @done-coding/cli-component
|
|
13
14
|
# 或
|
|
@@ -15,6 +16,7 @@ pnpm add @done-coding/cli-component
|
|
|
15
16
|
```
|
|
16
17
|
|
|
17
18
|
### 作为 done-coding CLI 的一部分
|
|
19
|
+
|
|
18
20
|
```bash
|
|
19
21
|
npm install -g @done-coding/cli
|
|
20
22
|
# 然后使用
|
|
@@ -46,6 +48,7 @@ dc-component --help
|
|
|
46
48
|
### 基础命令
|
|
47
49
|
|
|
48
50
|
#### `dc-component add <name>`
|
|
51
|
+
|
|
49
52
|
新增一个组件
|
|
50
53
|
|
|
51
54
|
```bash
|
|
@@ -57,9 +60,11 @@ dc-component add UserCard
|
|
|
57
60
|
```
|
|
58
61
|
|
|
59
62
|
**参数说明**:
|
|
63
|
+
|
|
60
64
|
- `name`: 组件名称(必需)
|
|
61
65
|
|
|
62
66
|
#### `dc-component remove [name]`
|
|
67
|
+
|
|
63
68
|
删除一个组件
|
|
64
69
|
|
|
65
70
|
```bash
|
|
@@ -71,9 +76,11 @@ dc-component remove
|
|
|
71
76
|
```
|
|
72
77
|
|
|
73
78
|
**参数说明**:
|
|
79
|
+
|
|
74
80
|
- `name`: 组件名称(可选)
|
|
75
81
|
|
|
76
82
|
#### `dc-component list`
|
|
83
|
+
|
|
77
84
|
展示组件列表
|
|
78
85
|
|
|
79
86
|
```bash
|
|
@@ -117,6 +124,7 @@ done-coding component list
|
|
|
117
124
|
### 常见问题
|
|
118
125
|
|
|
119
126
|
**Q: 组件创建失败**
|
|
127
|
+
|
|
120
128
|
```bash
|
|
121
129
|
# 检查当前目录
|
|
122
130
|
pwd
|
|
@@ -126,6 +134,7 @@ dc-component add MyButton
|
|
|
126
134
|
```
|
|
127
135
|
|
|
128
136
|
**Q: 组件列表为空**
|
|
137
|
+
|
|
129
138
|
```bash
|
|
130
139
|
# 确认是否在正确的项目目录
|
|
131
140
|
ls -la
|
|
@@ -135,6 +144,7 @@ dc-component list
|
|
|
135
144
|
```
|
|
136
145
|
|
|
137
146
|
**Q: 删除组件失败**
|
|
147
|
+
|
|
138
148
|
```bash
|
|
139
149
|
# 确认组件名称正确
|
|
140
150
|
dc-component list
|
|
@@ -157,7 +167,7 @@ ls -la src/components/
|
|
|
157
167
|
|
|
158
168
|
```bash
|
|
159
169
|
# 克隆仓库
|
|
160
|
-
git clone https://
|
|
170
|
+
git clone https://github.com/done-coding/done-coding-cli.git
|
|
161
171
|
cd done-coding-cli/packages/component
|
|
162
172
|
|
|
163
173
|
# 安装依赖
|
|
@@ -178,11 +188,11 @@ node es/cli.mjs --help
|
|
|
178
188
|
|
|
179
189
|
## 许可证
|
|
180
190
|
|
|
181
|
-
MIT © [
|
|
191
|
+
MIT © [done-coding](https://github.com/done-coding)
|
|
182
192
|
|
|
183
193
|
## 相关链接
|
|
184
194
|
|
|
185
195
|
- [主 CLI 工具](https://www.npmjs.com/package/@done-coding/cli)
|
|
186
196
|
- [模板处理工具](https://www.npmjs.com/package/@done-coding/cli-template) - 本包依赖的模板引擎
|
|
187
|
-
- [
|
|
197
|
+
- [Github 仓库](https://github.com/done-coding/done-coding-cli)
|
|
188
198
|
- [更新日志](./CHANGELOG.md)
|
package/es/cli.mjs
CHANGED
package/es/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { S as u, a as b, h as c } from "./index-
|
|
2
|
+
import { S as u, a as b, h as c } from "./index-1a8fe9cd.js";
|
|
3
3
|
import "node:path";
|
|
4
4
|
import "node:fs";
|
|
5
5
|
import "@done-coding/cli-utils";
|
|
@@ -11,6 +11,6 @@ import "lodash.template";
|
|
|
11
11
|
import "@done-coding/cli-template";
|
|
12
12
|
export {
|
|
13
13
|
u as SubcommandEnum,
|
|
14
|
-
b as
|
|
14
|
+
b as createAsSubcommand,
|
|
15
15
|
c as handler
|
|
16
16
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "done-coding-component",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "组件命令行工具",
|
|
5
5
|
"private": false,
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
],
|
|
21
21
|
"repository": {
|
|
22
22
|
"type": "git",
|
|
23
|
-
"url": "https://
|
|
23
|
+
"url": "https://github.com/done-coding/done-coding-cli.git",
|
|
24
24
|
"directory": "packages/component"
|
|
25
25
|
},
|
|
26
26
|
"publishConfig": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"sideEffects": false,
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@done-coding/cli-inject": "0.
|
|
34
|
+
"@done-coding/cli-inject": "0.6.0",
|
|
35
35
|
"@types/lodash.camelcase": "^4.3.8",
|
|
36
36
|
"@types/lodash.kebabcase": "^4.1.8",
|
|
37
37
|
"@types/lodash.lowerfirst": "^4.3.8",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"vite-plugin-dts": "^3.6.0"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@done-coding/cli-template": "0.
|
|
48
|
-
"@done-coding/cli-utils": "0.
|
|
47
|
+
"@done-coding/cli-template": "0.9.0",
|
|
48
|
+
"@done-coding/cli-utils": "0.9.0",
|
|
49
49
|
"lodash.camelcase": "^4.3.0",
|
|
50
50
|
"lodash.kebabcase": "^4.1.1",
|
|
51
51
|
"lodash.lowerfirst": "^4.3.1",
|
|
@@ -55,6 +55,6 @@
|
|
|
55
55
|
"engines": {
|
|
56
56
|
"node": ">=18.0.0"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "d72c025c7c59964ef0617891bec9e34df015bd47",
|
|
59
59
|
"scripts": {}
|
|
60
60
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -42,7 +42,7 @@ export declare interface ConfigListItem {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
/** 作为子命令创建 */
|
|
45
|
-
export declare const
|
|
45
|
+
export declare const createAsSubcommand: () => CommandModule<{}, {}>;
|
|
46
46
|
|
|
47
47
|
export declare const handler: (command: SubcommandEnum, argv: CliHandlerArgv<any>) => Promise<void>;
|
|
48
48
|
|