@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 ADDED
@@ -0,0 +1,7 @@
1
+ # @done-coding/cli
2
+
3
+ done-coding命令行工具
4
+
5
+ ## 安装
6
+
7
+ pnpm add @done-coding/cli
package/es/cli.mjs ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import { createCli as e } from "./main.mjs";
3
+ e();
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
+ };
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ const n = {
3
+ name: "@done-coding/cli",
4
+ version: "0.1.0",
5
+ description: "done-coding命令行工具"
6
+ };
7
+ export {
8
+ n as default
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
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,2 @@
1
+ export { command as injectCommand, handler as injectHandler, } from "@done-coding/cli-inject";
2
+ export { command as browserCommand, handler as browserHandler, } from '../node_modules/create-done-coding/types/index.d.ts';
@@ -0,0 +1,7 @@
1
+ declare const _default: {
2
+ "name": "@done-coding/cli",
3
+ "version": "0.1.0",
4
+ "description": "done-coding命令行工具"
5
+ };
6
+
7
+ export default _default;
@@ -0,0 +1,9 @@
1
+ export declare const createCli: () => {
2
+ [x: string]: unknown;
3
+ _: (string | number)[];
4
+ $0: string;
5
+ } | Promise<{
6
+ [x: string]: unknown;
7
+ _: (string | number)[];
8
+ $0: string;
9
+ }>;