done-coding-component 0.4.8 → 0.4.9
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 +183 -2
- package/es/cli.mjs +1 -1
- package/es/{index-7fe45e8f.js → index-578b8ec1.js} +96 -93
- package/es/index.mjs +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,7 +1,188 @@
|
|
|
1
1
|
# @done-coding/cli-component
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
组件生成命令行工具 - 快速创建和管理项目组件
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/@done-coding/cli-component)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
7
|
|
|
8
|
+
## 安装
|
|
9
|
+
|
|
10
|
+
### 独立安装
|
|
11
|
+
```bash
|
|
7
12
|
npm install @done-coding/cli-component
|
|
13
|
+
# 或
|
|
14
|
+
pnpm add @done-coding/cli-component
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### 作为 done-coding CLI 的一部分
|
|
18
|
+
```bash
|
|
19
|
+
npm install -g @done-coding/cli
|
|
20
|
+
# 然后使用
|
|
21
|
+
DC component [command]
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## 快速开始
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# 独立使用
|
|
28
|
+
dc-component [command]
|
|
29
|
+
|
|
30
|
+
# 作为主 CLI 的子命令
|
|
31
|
+
DC component [command]
|
|
32
|
+
|
|
33
|
+
# 查看帮助
|
|
34
|
+
dc-component --help
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## 功能特性
|
|
38
|
+
|
|
39
|
+
- ✅ **组件创建**: 使用 `add` 命令创建新组件
|
|
40
|
+
- 🗂️ **组件管理**: 使用 `list` 命令查看已创建的组件
|
|
41
|
+
- 🗑️ **组件删除**: 使用 `remove` 命令删除不需要的组件
|
|
42
|
+
- 🔧 **智能命名**: 自动处理组件名称的格式转换
|
|
43
|
+
|
|
44
|
+
## API 文档
|
|
45
|
+
|
|
46
|
+
### 基础命令
|
|
47
|
+
|
|
48
|
+
#### `dc-component add <name>`
|
|
49
|
+
新增一个组件
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# 创建一个名为 Button 的组件
|
|
53
|
+
dc-component add Button
|
|
54
|
+
|
|
55
|
+
# 创建一个名为 UserCard 的组件
|
|
56
|
+
dc-component add UserCard
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**参数说明**:
|
|
60
|
+
- `name`: 组件名称(必需)
|
|
61
|
+
|
|
62
|
+
#### `dc-component remove [name]`
|
|
63
|
+
删除一个组件
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
# 删除指定组件
|
|
67
|
+
dc-component remove Button
|
|
68
|
+
|
|
69
|
+
# 不指定名称时可能提供交互式选择
|
|
70
|
+
dc-component remove
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**参数说明**:
|
|
74
|
+
- `name`: 组件名称(可选)
|
|
75
|
+
|
|
76
|
+
#### `dc-component list`
|
|
77
|
+
展示组件列表
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
# 显示所有已创建的组件
|
|
81
|
+
dc-component list
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## 使用示例
|
|
85
|
+
|
|
86
|
+
### 基础使用场景
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# 1. 查看当前组件列表
|
|
90
|
+
dc-component list
|
|
91
|
+
|
|
92
|
+
# 2. 创建新组件
|
|
93
|
+
dc-component add MyButton
|
|
94
|
+
|
|
95
|
+
# 3. 再次查看组件列表确认创建
|
|
96
|
+
dc-component list
|
|
97
|
+
|
|
98
|
+
# 4. 删除不需要的组件
|
|
99
|
+
dc-component remove MyButton
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### 作为主 CLI 的一部分
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
# 使用主 CLI 命令
|
|
106
|
+
DC component add Button
|
|
107
|
+
DC component list
|
|
108
|
+
DC component remove Button
|
|
109
|
+
|
|
110
|
+
# 使用替代命令
|
|
111
|
+
dc-cli component add Button
|
|
112
|
+
done-coding component list
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## 故障排除
|
|
116
|
+
|
|
117
|
+
### 常见问题
|
|
118
|
+
|
|
119
|
+
**Q: 组件创建失败**
|
|
120
|
+
```bash
|
|
121
|
+
# 检查当前目录
|
|
122
|
+
pwd
|
|
123
|
+
|
|
124
|
+
# 查看详细错误信息
|
|
125
|
+
dc-component add MyButton
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
**Q: 组件列表为空**
|
|
129
|
+
```bash
|
|
130
|
+
# 确认是否在正确的项目目录
|
|
131
|
+
ls -la
|
|
132
|
+
|
|
133
|
+
# 检查是否已创建过组件
|
|
134
|
+
dc-component list
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
**Q: 删除组件失败**
|
|
138
|
+
```bash
|
|
139
|
+
# 确认组件名称正确
|
|
140
|
+
dc-component list
|
|
141
|
+
|
|
142
|
+
# 检查文件权限
|
|
143
|
+
ls -la src/components/
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## 贡献指南
|
|
147
|
+
|
|
148
|
+
我们欢迎贡献!请遵循以下步骤:
|
|
149
|
+
|
|
150
|
+
1. Fork 本仓库
|
|
151
|
+
2. 创建功能分支:`git checkout -b feature/amazing-feature`
|
|
152
|
+
3. 提交更改:`git commit -m "feat: add amazing feature"`
|
|
153
|
+
4. 推送分支:`git push origin feature/amazing-feature`
|
|
154
|
+
5. 创建 Pull Request
|
|
155
|
+
|
|
156
|
+
### 开发环境设置
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
# 克隆仓库
|
|
160
|
+
git clone https://gitee.com/done-coding/done-coding-cli.git
|
|
161
|
+
cd done-coding-cli/packages/component
|
|
162
|
+
|
|
163
|
+
# 安装依赖
|
|
164
|
+
pnpm install
|
|
165
|
+
|
|
166
|
+
# 开发模式
|
|
167
|
+
pnpm dev
|
|
168
|
+
|
|
169
|
+
# 构建
|
|
170
|
+
pnpm build
|
|
171
|
+
|
|
172
|
+
# 本地开发测试
|
|
173
|
+
node es/cli.mjs --help
|
|
174
|
+
|
|
175
|
+
# 注意:本地使用 node + 入口文件,发布后使用 bin 命令名
|
|
176
|
+
# 功能完全一致,只是调用方式不同
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## 许可证
|
|
180
|
+
|
|
181
|
+
MIT © [JustSoSu](https://gitee.com/done-coding)
|
|
182
|
+
|
|
183
|
+
## 相关链接
|
|
184
|
+
|
|
185
|
+
- [主 CLI 工具](https://www.npmjs.com/package/@done-coding/cli)
|
|
186
|
+
- [模板处理工具](https://www.npmjs.com/package/@done-coding/cli-template) - 本包依赖的模板引擎
|
|
187
|
+
- [Gitee 仓库](https://gitee.com/done-coding/done-coding-cli)
|
|
188
|
+
- [更新日志](./CHANGELOG.md)
|
package/es/cli.mjs
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import p from "node:path";
|
|
3
|
-
import
|
|
4
|
-
import { log as
|
|
3
|
+
import u from "node:fs";
|
|
4
|
+
import { log as m, json5 as F, getLogText as $, xPrompts as w, createSubcommand as O, getRootScriptName as V, createMainCommand as J } from "@done-coding/cli-utils";
|
|
5
5
|
import x from "lodash.upperfirst";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import S from "lodash.camelcase";
|
|
7
|
+
import v from "lodash.kebabcase";
|
|
8
8
|
import T from "lodash.lowerfirst";
|
|
9
9
|
import f from "lodash.template";
|
|
10
10
|
import { OutputModeEnum as E, compileHandler as C } from "@done-coding/cli-template";
|
|
11
|
-
var
|
|
11
|
+
var l = /* @__PURE__ */ ((e) => (e.ADD = "add", e.REMOVE = "remove", e.LIST = "list", e))(l || {});
|
|
12
12
|
const _ = (e, t) => {
|
|
13
13
|
if (!/^[a-zA-Z]+[a-zA-Z0-9-]*$/.test(e))
|
|
14
|
-
return
|
|
14
|
+
return m.error("组件名只能包含字母、数字、中划线"), process.exit(1);
|
|
15
15
|
const { nameExcludes: n } = t;
|
|
16
|
-
return n.includes(e) ? (
|
|
16
|
+
return n.includes(e) ? (m.error(`组件名: ${e}是保留名称。
|
|
17
17
|
保留名称: ${n.join(",")}`), process.exit(1)) : !0;
|
|
18
|
-
},
|
|
18
|
+
}, g = {
|
|
19
19
|
name: "@done-coding/cli-component",
|
|
20
|
-
version: "0.4.
|
|
20
|
+
version: "0.4.9",
|
|
21
21
|
description: "组件命令行工具",
|
|
22
22
|
bin: {
|
|
23
23
|
"dc-component": "es/cli.mjs"
|
|
@@ -26,82 +26,82 @@ const _ = (e, t) => {
|
|
|
26
26
|
namespaceDir: ".done-coding",
|
|
27
27
|
moduleName: "component"
|
|
28
28
|
}
|
|
29
|
-
}, { namespaceDir: K, moduleName: z } =
|
|
29
|
+
}, { namespaceDir: K, moduleName: z } = g.cliConfig, N = () => p.resolve(K, z), I = () => ({
|
|
30
30
|
execDir: process.cwd(),
|
|
31
31
|
templateDir: N()
|
|
32
|
-
}),
|
|
33
|
-
const { series: t, name: n } = e, o = x(
|
|
32
|
+
}), D = (e) => {
|
|
33
|
+
const { series: t, name: n } = e, o = x(S(n)), i = T(o), a = v(o), s = t ? x(S(t)) : "", c = s ? `${s}${o}` : "", d = v(c);
|
|
34
34
|
return {
|
|
35
35
|
series: s,
|
|
36
36
|
name: o,
|
|
37
|
-
nameLowerFirst:
|
|
37
|
+
nameLowerFirst: i,
|
|
38
38
|
nameKebab: a,
|
|
39
|
-
fullName:
|
|
39
|
+
fullName: c,
|
|
40
40
|
fullNameKebab: d,
|
|
41
41
|
cls: d
|
|
42
42
|
};
|
|
43
43
|
}, Z = (e) => ({
|
|
44
44
|
$: "$",
|
|
45
45
|
...I(),
|
|
46
|
-
...
|
|
47
|
-
}),
|
|
46
|
+
...D(e)
|
|
47
|
+
}), h = () => {
|
|
48
48
|
const e = p.resolve(N(), "index.json");
|
|
49
|
-
if (!
|
|
50
|
-
return
|
|
51
|
-
const n = JSON.parse(
|
|
49
|
+
if (!u.existsSync(e))
|
|
50
|
+
return m.error(`模块入口文件不存在: ${e}`), process.exit(1);
|
|
51
|
+
const n = JSON.parse(u.readFileSync(e, "utf-8")).config;
|
|
52
52
|
if (!n)
|
|
53
|
-
return
|
|
53
|
+
return m.error(`配置文件相对路径不存在: ${n}`), process.exit(1);
|
|
54
54
|
const o = p.resolve(
|
|
55
55
|
p.dirname(e),
|
|
56
56
|
n
|
|
57
57
|
);
|
|
58
|
-
if (!
|
|
59
|
-
return
|
|
60
|
-
const
|
|
61
|
-
return
|
|
58
|
+
if (!u.existsSync(o))
|
|
59
|
+
return m.error(`配置文件不存在: ${o}`), process.exit(1);
|
|
60
|
+
const i = F.parse(u.readFileSync(o, "utf-8")), a = I();
|
|
61
|
+
return i.componentDir = f(i.componentDir)(a), u.existsSync(i.componentDir) || u.mkdirSync(i.componentDir, {
|
|
62
62
|
recursive: !0
|
|
63
|
-
}),
|
|
64
|
-
},
|
|
63
|
+
}), i;
|
|
64
|
+
}, R = async ({
|
|
65
65
|
name: e,
|
|
66
66
|
config: t,
|
|
67
67
|
command: n
|
|
68
68
|
}) => {
|
|
69
|
-
if (![
|
|
70
|
-
return
|
|
69
|
+
if (![l.ADD, l.REMOVE].includes(n))
|
|
70
|
+
return m.error(`不支持组件${n}操作`), process.exit(1);
|
|
71
71
|
const o = Z({
|
|
72
72
|
...t,
|
|
73
73
|
name: e
|
|
74
|
-
}),
|
|
75
|
-
for (const { entry: s, index:
|
|
74
|
+
}), i = process.cwd(), a = JSON.stringify(o);
|
|
75
|
+
for (const { entry: s, index: c } of t.list) {
|
|
76
76
|
const d = {
|
|
77
77
|
envData: a,
|
|
78
|
-
rollback: n ===
|
|
78
|
+
rollback: n === l.REMOVE,
|
|
79
79
|
/** 回滚时可以删除空文件 */
|
|
80
80
|
rollbackDelNullFile: !0,
|
|
81
81
|
rollbackDelAskAsYes: !0,
|
|
82
82
|
dealMarkdown: !0,
|
|
83
83
|
batch: !1,
|
|
84
|
-
rootDir:
|
|
84
|
+
rootDir: i
|
|
85
85
|
};
|
|
86
86
|
if (s) {
|
|
87
87
|
const r = s;
|
|
88
88
|
r != null && r.input && (r.input = f(r.input)(o)), r != null && r.output && (r.output = f(r.output)(o));
|
|
89
|
-
const
|
|
89
|
+
const b = {
|
|
90
90
|
...s,
|
|
91
91
|
mode: E.APPEND,
|
|
92
92
|
...d
|
|
93
93
|
};
|
|
94
|
-
await C(
|
|
94
|
+
await C(b);
|
|
95
95
|
}
|
|
96
|
-
if (
|
|
97
|
-
const r =
|
|
96
|
+
if (c) {
|
|
97
|
+
const r = c;
|
|
98
98
|
r != null && r.input && (r.input = f(r.input)(o)), r != null && r.output && (r.output = f(r.output)(o));
|
|
99
|
-
const
|
|
100
|
-
...
|
|
99
|
+
const b = {
|
|
100
|
+
...c,
|
|
101
101
|
mode: E.OVERWRITE,
|
|
102
102
|
...d
|
|
103
103
|
};
|
|
104
|
-
await C(
|
|
104
|
+
await C(b);
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
}, H = () => ({
|
|
@@ -118,41 +118,44 @@ const _ = (e, t) => {
|
|
|
118
118
|
}
|
|
119
119
|
}), y = (e) => {
|
|
120
120
|
const { componentDir: t, nameExcludes: n } = e;
|
|
121
|
-
return
|
|
122
|
-
const
|
|
123
|
-
return
|
|
124
|
-
}).filter((s) => !(!s || n.includes(s))) : (
|
|
125
|
-
},
|
|
121
|
+
return u.statSync(t).isDirectory() ? u.readdirSync(t).map((s) => {
|
|
122
|
+
const c = p.join(t, s);
|
|
123
|
+
return u.statSync(c).isDirectory() ? (m.info("filePath:", c, p.basename(c)), p.basename(c)) : "";
|
|
124
|
+
}).filter((s) => !(!s || n.includes(s))) : (m.error("组件源码路径不是目录"), process.exit(1));
|
|
125
|
+
}, k = async ({
|
|
126
126
|
outputJson: e,
|
|
127
127
|
outputPath: t
|
|
128
128
|
}) => {
|
|
129
|
-
|
|
130
|
-
const n =
|
|
131
|
-
const { name:
|
|
129
|
+
m.stage("展示列表");
|
|
130
|
+
const n = h(), o = y(n), i = t || n.nameListJsonOutputPath, a = o.map((s) => {
|
|
131
|
+
const { name: c, fullName: d } = D({
|
|
132
132
|
...n,
|
|
133
133
|
name: s
|
|
134
134
|
});
|
|
135
135
|
return {
|
|
136
|
-
name:
|
|
136
|
+
name: c,
|
|
137
137
|
nameKebab: s,
|
|
138
138
|
fullName: d
|
|
139
139
|
};
|
|
140
140
|
});
|
|
141
141
|
if (console.table(
|
|
142
|
-
a.map(({ name: s, fullName:
|
|
143
|
-
[
|
|
144
|
-
[
|
|
145
|
-
[
|
|
142
|
+
a.map(({ name: s, fullName: c, nameKebab: d }) => ({
|
|
143
|
+
[$.success("名称")]: s,
|
|
144
|
+
[$.success("带系列名称")]: c,
|
|
145
|
+
[$.success("绝对路径")]: p.resolve(
|
|
146
|
+
n.componentDir,
|
|
147
|
+
d
|
|
148
|
+
)
|
|
146
149
|
}))
|
|
147
|
-
), e &&
|
|
148
|
-
const s = p.resolve(
|
|
149
|
-
|
|
150
|
+
), e && i) {
|
|
151
|
+
const s = p.resolve(i), c = p.dirname(s);
|
|
152
|
+
u.existsSync(c) || u.mkdirSync(c, { recursive: !0 }), m.stage(`输出组件名列表到${s}`), u.writeFileSync(s, JSON.stringify(a, null, 2));
|
|
150
153
|
}
|
|
151
154
|
}, U = {
|
|
152
|
-
command:
|
|
155
|
+
command: l.LIST,
|
|
153
156
|
describe: "展示组件列表",
|
|
154
157
|
options: H(),
|
|
155
|
-
handler:
|
|
158
|
+
handler: k
|
|
156
159
|
}, W = () => ({
|
|
157
160
|
name: {
|
|
158
161
|
describe: "组件名称",
|
|
@@ -161,29 +164,29 @@ const _ = (e, t) => {
|
|
|
161
164
|
}), A = async ({
|
|
162
165
|
name: e
|
|
163
166
|
}) => {
|
|
164
|
-
|
|
167
|
+
m.stage("添加组件");
|
|
165
168
|
let t;
|
|
166
169
|
e ? t = e : t = (await w({
|
|
167
170
|
type: "text",
|
|
168
171
|
name: "name",
|
|
169
172
|
message: "请输入组件名"
|
|
170
173
|
})).name;
|
|
171
|
-
const n =
|
|
174
|
+
const n = h();
|
|
172
175
|
_(t, n);
|
|
173
|
-
const { series: o } = n,
|
|
174
|
-
for (let a of
|
|
175
|
-
if (
|
|
176
|
+
const { series: o } = n, i = await y(n);
|
|
177
|
+
for (let a of i)
|
|
178
|
+
if (D({
|
|
176
179
|
series: o,
|
|
177
180
|
name: t
|
|
178
181
|
}).nameKebab === a)
|
|
179
|
-
return
|
|
180
|
-
return
|
|
182
|
+
return m.error(`组件${a}已存在, 不能再次创建${t}组件`), process.exit(1);
|
|
183
|
+
return R({
|
|
181
184
|
name: t,
|
|
182
185
|
config: n,
|
|
183
|
-
command:
|
|
186
|
+
command: l.ADD
|
|
184
187
|
});
|
|
185
188
|
}, Y = {
|
|
186
|
-
command: `${
|
|
189
|
+
command: `${l.ADD} <name>`,
|
|
187
190
|
describe: "新增一个组件",
|
|
188
191
|
positionals: W(),
|
|
189
192
|
handler: A
|
|
@@ -195,10 +198,10 @@ const _ = (e, t) => {
|
|
|
195
198
|
}), M = async ({
|
|
196
199
|
name: e
|
|
197
200
|
}) => {
|
|
198
|
-
|
|
199
|
-
const t =
|
|
201
|
+
m.stage("移除组件");
|
|
202
|
+
const t = h(), n = await y(t);
|
|
200
203
|
if (n.length === 0)
|
|
201
|
-
return
|
|
204
|
+
return m.error("组件列表为空"), process.exit(1);
|
|
202
205
|
let o;
|
|
203
206
|
e ? o = e : o = (await w({
|
|
204
207
|
type: "select",
|
|
@@ -206,37 +209,37 @@ const _ = (e, t) => {
|
|
|
206
209
|
message: "请选择要移除的组件",
|
|
207
210
|
choices: n.map((a) => ({ title: a, value: a }))
|
|
208
211
|
})).name;
|
|
209
|
-
const { series:
|
|
212
|
+
const { series: i } = t;
|
|
210
213
|
for (let a of n)
|
|
211
|
-
if (
|
|
212
|
-
series:
|
|
214
|
+
if (D({
|
|
215
|
+
series: i,
|
|
213
216
|
name: o
|
|
214
217
|
}).nameKebab === a) {
|
|
215
|
-
await
|
|
218
|
+
await R({
|
|
216
219
|
name: o,
|
|
217
220
|
config: t,
|
|
218
|
-
command:
|
|
219
|
-
}),
|
|
221
|
+
command: l.REMOVE
|
|
222
|
+
}), u.rmdirSync(p.resolve(t.componentDir, a));
|
|
220
223
|
return;
|
|
221
224
|
}
|
|
222
|
-
return
|
|
225
|
+
return m.error(`组件${o}不存在`), process.exit(1);
|
|
223
226
|
}, B = {
|
|
224
|
-
command: `${
|
|
227
|
+
command: `${l.REMOVE} [name]`,
|
|
225
228
|
describe: "删除一个组件",
|
|
226
229
|
positionals: q(),
|
|
227
230
|
handler: M
|
|
228
|
-
},
|
|
231
|
+
}, ie = async (e, t) => {
|
|
229
232
|
switch (e) {
|
|
230
|
-
case
|
|
233
|
+
case l.ADD:
|
|
231
234
|
return A(t);
|
|
232
|
-
case
|
|
235
|
+
case l.REMOVE:
|
|
233
236
|
return M(t);
|
|
234
|
-
case
|
|
235
|
-
return
|
|
237
|
+
case l.LIST:
|
|
238
|
+
return k(t);
|
|
236
239
|
default:
|
|
237
240
|
throw new Error(`不支持的命令 ${e}`);
|
|
238
241
|
}
|
|
239
|
-
}, { version: G, description: Q } =
|
|
242
|
+
}, { version: G, description: Q } = g, L = {
|
|
240
243
|
describe: Q,
|
|
241
244
|
version: G,
|
|
242
245
|
subcommands: [
|
|
@@ -245,22 +248,22 @@ const _ = (e, t) => {
|
|
|
245
248
|
U
|
|
246
249
|
].map(O),
|
|
247
250
|
demandCommandCount: 1,
|
|
248
|
-
rootScriptName: V({ packageJson:
|
|
251
|
+
rootScriptName: V({ packageJson: g })
|
|
249
252
|
}, {
|
|
250
253
|
cliConfig: { moduleName: P }
|
|
251
|
-
} =
|
|
254
|
+
} = g, j = (e = !1) => {
|
|
252
255
|
const t = e ? P : void 0, n = `$0${e ? ` ${P}` : ""} <command> [options]`;
|
|
253
256
|
return { command: t, usage: n };
|
|
254
257
|
}, me = async () => J({
|
|
255
|
-
...
|
|
256
|
-
...
|
|
257
|
-
}),
|
|
258
|
-
...
|
|
259
|
-
...
|
|
258
|
+
...L,
|
|
259
|
+
...j()
|
|
260
|
+
}), ue = () => O({
|
|
261
|
+
...L,
|
|
262
|
+
...j(!0)
|
|
260
263
|
});
|
|
261
264
|
export {
|
|
262
|
-
|
|
263
|
-
|
|
265
|
+
l as S,
|
|
266
|
+
ue as a,
|
|
264
267
|
me as c,
|
|
265
|
-
|
|
268
|
+
ie as h
|
|
266
269
|
};
|
package/es/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "done-coding-component",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.9",
|
|
4
4
|
"description": "组件命令行工具",
|
|
5
5
|
"private": false,
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"sideEffects": false,
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@done-coding/cli-inject": "0.5.
|
|
34
|
+
"@done-coding/cli-inject": "0.5.20",
|
|
35
35
|
"@types/lodash.camelcase": "^4.3.8",
|
|
36
36
|
"@types/lodash.kebabcase": "^4.1.8",
|
|
37
37
|
"@types/lodash.lowerfirst": "^4.3.8",
|
|
@@ -48,14 +48,14 @@
|
|
|
48
48
|
"node": ">=18.0.0"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@done-coding/cli-template": "0.8.
|
|
52
|
-
"@done-coding/cli-utils": "0.8.
|
|
51
|
+
"@done-coding/cli-template": "0.8.7",
|
|
52
|
+
"@done-coding/cli-utils": "0.8.1",
|
|
53
53
|
"lodash.camelcase": "^4.3.0",
|
|
54
54
|
"lodash.kebabcase": "^4.1.1",
|
|
55
55
|
"lodash.lowerfirst": "^4.3.1",
|
|
56
56
|
"lodash.template": "^4.5.0",
|
|
57
57
|
"lodash.upperfirst": "^4.3.1"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "0930f800167c04a86b56eae9741872dd51bec0c6",
|
|
60
60
|
"scripts": {}
|
|
61
61
|
}
|