create-done-coding 0.4.5 → 0.4.7
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 +0 -0
- package/es/cli.mjs +0 -0
- package/es/handler.mjs +0 -0
- package/es/index.mjs +0 -0
- package/es/injectInfo.json.mjs +6 -2
- package/es/main.mjs +17 -17
- package/es/utils/const.mjs +0 -0
- package/es/utils/question.mjs +0 -0
- package/es/utils/readConfig.mjs +0 -0
- package/package.json +3 -3
- package/types/cli.d.ts +0 -0
- package/types/handler.d.ts +1 -1
- package/types/index.d.ts +0 -0
- package/types/injectInfo.json.d.ts +6 -2
- package/types/main.d.ts +0 -0
- package/types/utils/const.d.ts +0 -0
- package/types/utils/index.d.ts +0 -0
- package/types/utils/question.d.ts +0 -0
- package/types/utils/readConfig.d.ts +0 -0
- package/types/utils/types.d.ts +0 -0
package/README.md
CHANGED
|
File without changes
|
package/es/cli.mjs
CHANGED
|
File without changes
|
package/es/handler.mjs
CHANGED
|
File without changes
|
package/es/index.mjs
CHANGED
|
File without changes
|
package/es/injectInfo.json.mjs
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
const e = {
|
|
3
|
+
version: "0.4.7",
|
|
3
4
|
name: "create-done-coding",
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
description: "项目创建命令行工具",
|
|
6
|
+
cliConfig: {
|
|
7
|
+
namespaceDir: ".done-coding",
|
|
8
|
+
moduleName: "create"
|
|
9
|
+
}
|
|
6
10
|
};
|
|
7
11
|
export {
|
|
8
12
|
e as default
|
package/es/main.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import c from "yargs";
|
|
3
3
|
import { hideBin as m } from "yargs/helpers";
|
|
4
|
-
import { handler as
|
|
5
|
-
import
|
|
6
|
-
import { projectNameForm as l, getTemplateChoices as p, getTemplateForm as d, saveGitHistoryForm as g, shallowCloneForm as
|
|
7
|
-
import
|
|
8
|
-
const
|
|
4
|
+
import { handler as t } from "./handler.mjs";
|
|
5
|
+
import a from "chalk";
|
|
6
|
+
import { projectNameForm as l, getTemplateChoices as p, getTemplateForm as d, saveGitHistoryForm as g, shallowCloneForm as f } from "./utils/question.mjs";
|
|
7
|
+
import s from "./injectInfo.json.mjs";
|
|
8
|
+
const h = async () => ({
|
|
9
9
|
projectName: {
|
|
10
10
|
type: "string",
|
|
11
11
|
alias: "p",
|
|
@@ -25,22 +25,22 @@ const f = async () => ({
|
|
|
25
25
|
shallowClone: {
|
|
26
26
|
type: "boolean",
|
|
27
27
|
alias: "c",
|
|
28
|
-
describe:
|
|
28
|
+
describe: f.message,
|
|
29
29
|
default: !0
|
|
30
30
|
}
|
|
31
|
-
}),
|
|
32
|
-
console.log(e ?
|
|
33
|
-
},
|
|
34
|
-
const n = await
|
|
35
|
-
return e.strict().usage(o).help("help").version(
|
|
36
|
-
}, C = (e) =>
|
|
37
|
-
command:
|
|
38
|
-
describe:
|
|
31
|
+
}), i = s.cliConfig.moduleName, u = (e, o) => {
|
|
32
|
+
console.log(e ? a.red(e) : a.red(o.message)), process.exit(1);
|
|
33
|
+
}, y = s.description, b = `Usage: $0 ${i} [options]`, v = "Usage: $0 [options]", r = async (e, o) => {
|
|
34
|
+
const n = await h();
|
|
35
|
+
return e.strict().usage(o).help("help").version(s.version).alias("v", "version").alias("h", "help").options(n).fail(u).argv;
|
|
36
|
+
}, C = (e) => r(e, b), $ = {
|
|
37
|
+
command: i,
|
|
38
|
+
describe: y,
|
|
39
39
|
builder: C,
|
|
40
|
-
handler:
|
|
40
|
+
handler: t
|
|
41
41
|
}, x = async () => {
|
|
42
|
-
const e = c(m(process.argv)), o = await
|
|
43
|
-
return
|
|
42
|
+
const e = c(m(process.argv)), o = await r(e, v);
|
|
43
|
+
return t(o);
|
|
44
44
|
};
|
|
45
45
|
export {
|
|
46
46
|
$ as command,
|
package/es/utils/const.mjs
CHANGED
|
File without changes
|
package/es/utils/question.mjs
CHANGED
|
File without changes
|
package/es/utils/readConfig.mjs
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-done-coding",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.7",
|
|
4
4
|
"description": "项目创建命令行工具",
|
|
5
5
|
"module": "es/index.mjs",
|
|
6
6
|
"type": "module",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"license": "MIT",
|
|
39
39
|
"sideEffects": false,
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@done-coding/cli-inject": "^0.
|
|
41
|
+
"@done-coding/cli-inject": "^0.3.1",
|
|
42
42
|
"@types/node": "^20.0.0",
|
|
43
43
|
"@types/prompts": "^2.4.6",
|
|
44
44
|
"@types/yargs": "^17.0.28",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"prompts": "^2.4.2",
|
|
56
56
|
"yargs": "^17.7.2"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "d1dabd6e46a5e38793bba477449dd62aa4d9c4c1"
|
|
59
59
|
}
|
package/types/cli.d.ts
CHANGED
|
File without changes
|
package/types/handler.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type Options } from './utils';
|
|
2
2
|
import type { ArgumentsCamelCase } from "yargs";
|
|
3
|
-
export declare const handler: (argv: ArgumentsCamelCase<Options>) => Promise<undefined>;
|
|
3
|
+
export declare const handler: (argv: ArgumentsCamelCase<Options> | Options) => Promise<undefined>;
|
package/types/index.d.ts
CHANGED
|
File without changes
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
+
"version": "0.4.7",
|
|
2
3
|
"name": "create-done-coding",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
4
|
+
"description": "项目创建命令行工具",
|
|
5
|
+
"cliConfig": {
|
|
6
|
+
"namespaceDir": ".done-coding",
|
|
7
|
+
"moduleName": "create"
|
|
8
|
+
}
|
|
5
9
|
};
|
|
6
10
|
|
|
7
11
|
export default _default;
|
package/types/main.d.ts
CHANGED
|
File without changes
|
package/types/utils/const.d.ts
CHANGED
|
File without changes
|
package/types/utils/index.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/types/utils/types.d.ts
CHANGED
|
File without changes
|