@cyber-tools/create-cyber-library 7.0.0 → 7.2.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.
@@ -0,0 +1,13 @@
1
+ const path = require("path");
2
+ const esbuild = require("esbuild");
3
+
4
+ setImmediate(async () => {
5
+ await esbuild.build({
6
+ entryPoints: [path.resolve(process.cwd(), "./src/index.ts")],
7
+ bundle: true,
8
+ format: "cjs",
9
+ platform: "node",
10
+ outdir: path.resolve(process.cwd(), "./dist/"),
11
+ external: ["knex", "electron"]
12
+ });
13
+ });
@@ -0,0 +1,17 @@
1
+ const fs = require("fs");
2
+ const path = require("path");
3
+ const esbuild = require("esbuild");
4
+ const { promisify } = require("util");
5
+
6
+ setImmediate(async () => {
7
+ await promisify(fs.rm)(path.resolve(process.cwd(), "./dist/"), { recursive: true, force: true });
8
+ await esbuild.build({
9
+ entryPoints: [path.resolve(process.cwd(), "./src/index.ts")],
10
+ bundle: true,
11
+ format: "cjs",
12
+ platform: "node",
13
+ outdir: path.resolve(process.cwd(), "./dist/"),
14
+ external: ["knex", "electron"]
15
+ });
16
+ require("../dist/index.js");
17
+ });
package/package.json CHANGED
@@ -1,15 +1,17 @@
1
1
  {
2
2
  "name": "@cyber-tools/create-cyber-library",
3
- "version": "7.0.0",
3
+ "version": "7.2.0",
4
4
  "description": "用于创建cyber库文件的命令行工具",
5
- "main": "./.bin/index.js",
5
+ "main": "./dist/index.js",
6
6
  "scripts": {
7
- "test": "echo test"
7
+ "dev": "node ./frameworks/development.js",
8
+ "build": "node ./frameworks/build.js",
9
+ "prepublishOnly": "npm run build"
8
10
  },
9
11
  "publishConfig": {
10
12
  "access": "public"
11
13
  },
12
- "bin": "./.bin/index.js",
14
+ "bin": "./dist/index.js",
13
15
  "keywords": [
14
16
  "cyber",
15
17
  "create",
@@ -38,4 +40,4 @@
38
40
  "devDependencies": {
39
41
  "esbuild": "^0.27.4"
40
42
  }
41
- }
43
+ }
@@ -1,3 +1,4 @@
1
+ #!/usr/bin/env node
1
2
  import { IOCContainer } from "@/commons/IOCContainer";
2
3
  import { CommandLineUtils } from "@/utils/CommandLineUtils";
3
4
  import { CreateLibraryAction } from "@/actions/CreateLibraryAction";
package/tsconfig.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "sourceMap": true,
15
15
  "paths": {
16
16
  "@/*": [
17
- "./*"
17
+ "./src/*"
18
18
  ]
19
19
  }
20
20
  }
package/.bin/index.js DELETED
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- require("esbuild-register");
3
- require("../index.ts");
File without changes
File without changes
File without changes
File without changes