@done-coding/cli 0.1.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 +7 -0
- package/es/cli.mjs +3 -0
- package/es/index.mjs +9 -0
- package/es/injectInfo.json.mjs +9 -0
- package/es/main.mjs +16 -0
- package/package.json +60 -0
- package/types/cli.d.ts +2 -0
- package/types/index.d.ts +2 -0
- package/types/injectInfo.json.d.ts +7 -0
- package/types/main.d.ts +9 -0
package/README.md
ADDED
package/es/cli.mjs
ADDED
package/es/index.mjs
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { command as a, handler as e } from "@done-coding/cli-inject";
|
|
3
|
+
import { command as m, handler as d } from "create-done-coding/assets";
|
|
4
|
+
export {
|
|
5
|
+
m as browserCommand,
|
|
6
|
+
d as browserHandler,
|
|
7
|
+
a as injectCommand,
|
|
8
|
+
e as injectHandler
|
|
9
|
+
};
|
package/es/main.mjs
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import m from "yargs";
|
|
3
|
+
import { hideBin as n } from "yargs/helpers";
|
|
4
|
+
import e from "chalk";
|
|
5
|
+
import { command as a } from "@done-coding/cli-inject";
|
|
6
|
+
import { command as i } from "create-done-coding/assets";
|
|
7
|
+
import s from "./injectInfo.json.mjs";
|
|
8
|
+
const c = (o, r) => {
|
|
9
|
+
console.log(o ? e.red(o) : e.red(r.message)), process.exit(1);
|
|
10
|
+
}, v = () => {
|
|
11
|
+
const o = n(process.argv);
|
|
12
|
+
return m(o).strict().usage("Usage: $0 <command> [options]").demandCommand(1).help("help").version(s.version).alias("h", "help").alias("v", "version").command(i).command(a).fail(c).argv;
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
v as createCli
|
|
16
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@done-coding/cli",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "done-coding命令行工具",
|
|
5
|
+
"private": false,
|
|
6
|
+
"module": "es/cli.mjs",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"types": "types/cli.d.ts",
|
|
9
|
+
"bin": "es/cli.mjs",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"import": "./es/cli.mjs"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"es",
|
|
17
|
+
"lib",
|
|
18
|
+
"types",
|
|
19
|
+
"gif"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"clean": "rimraf es lib types",
|
|
23
|
+
"predev": "pnpm run clean",
|
|
24
|
+
"dev": "vite build --watch",
|
|
25
|
+
"prebuild": "pnpm run clean",
|
|
26
|
+
"build": "vite build",
|
|
27
|
+
"prepack": "pnpm build"
|
|
28
|
+
},
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "https://gitee.com/justsosu/done-coding-cli.git",
|
|
32
|
+
"directory": "packages/cli"
|
|
33
|
+
},
|
|
34
|
+
"publishConfig": {
|
|
35
|
+
"access": "public"
|
|
36
|
+
},
|
|
37
|
+
"author": "JustSoSu",
|
|
38
|
+
"license": "MIT",
|
|
39
|
+
"sideEffects": false,
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@types/node": "^20.0.0",
|
|
42
|
+
"@types/prompts": "^2.4.6",
|
|
43
|
+
"@types/yargs": "^17.0.28",
|
|
44
|
+
"rimraf": "^6.0.1",
|
|
45
|
+
"typescript": "^5.2.2",
|
|
46
|
+
"vite": "^4.4.11",
|
|
47
|
+
"vite-plugin-dts": "^3.6.0"
|
|
48
|
+
},
|
|
49
|
+
"engines": {
|
|
50
|
+
"node": ">=16.0.0"
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"@done-coding/cli-inject": "^0.1.0",
|
|
54
|
+
"chalk": "^5.3.0",
|
|
55
|
+
"create-done-coding": "^0.4.1",
|
|
56
|
+
"prompts": "^2.4.2",
|
|
57
|
+
"yargs": "^17.7.2"
|
|
58
|
+
},
|
|
59
|
+
"gitHead": "86e1d77d045ee4bbf2c48c4e7c55ae79ae29939c"
|
|
60
|
+
}
|
package/types/cli.d.ts
ADDED
package/types/index.d.ts
ADDED