@zwa73/dev-utils 1.0.85 → 1.0.86

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.
@@ -26,22 +26,17 @@
26
26
  "@types/node": "^22.5.2",
27
27
  "@types/react": "^18.3.5",
28
28
  "@types/react-dom": "^18.3.0",
29
- "@typescript-eslint/eslint-plugin": "^5.62.0",
30
- "@typescript-eslint/parser": "^5.62.0",
31
29
  "@vercel/webpack-asset-relocator-loader": "^1.7.3",
32
30
  "babel-loader": "^9.1.3",
33
31
  "css-loader": "^6.11.0",
34
32
  "electron": "*",
35
- "eslint": "^8.57.0",
36
- "eslint-plugin-import": "^2.29.1",
37
33
  "fork-ts-checker-webpack-plugin": "^7.3.0",
38
34
  "node-loader": "^2.0.0",
39
35
  "style-loader": "^3.3.4",
40
36
  "ts-loader": "^9.5.1",
41
37
  "ts-node": "^10.9.2",
42
38
  "tsconfig-paths-webpack-plugin": "^4.1.0",
43
- "typescript": "~4.5.4",
44
- "typescript-eslint": "^8.5.0"
39
+ "typescript": "~4.5.4"
45
40
  },
46
41
  "keywords": [],
47
42
  "author": {
@@ -25,7 +25,8 @@
25
25
  "include": [
26
26
  "./src/**/*.ts",
27
27
  "./src/**/*.tsx",
28
- "webpack.plugins.ts"
28
+ "webpack.plugins.ts",
29
+ "forge.config.ts"
29
30
  ],
30
31
  "exclude": ["./node_modules/**/*"]
31
32
  }
@@ -55,6 +55,11 @@ const CmdGenTemplate = (program) => program
55
55
  await installPackage(projectPath, ['@zwa73/utils'], ['@types/node']);
56
56
  if (await utils_1.UtilFT.pathExists(pathe_1.default.join(projectPath, "gitignore")))
57
57
  await fs_1.default.promises.rename(pathe_1.default.join(projectPath, "gitignore"), pathe_1.default.join(projectPath, ".gitignore"));
58
+ const packageJson = await utils_1.UtilFT.loadJSONFile(pathe_1.default.join(projectPath, 'package.json'));
59
+ packageJson.name = opt.projectName;
60
+ packageJson.description = opt.projectDescription;
61
+ packageJson.author = opt.authorName;
62
+ await utils_1.UtilFT.writeJSONFile(pathe_1.default.join(projectPath, 'package.json'), packageJson);
58
63
  switch (templateName) {
59
64
  case 'base': break;
60
65
  case 'electron': break;
@@ -49,6 +49,11 @@ export const CmdGenTemplate = (program) => program
49
49
  await installPackage(projectPath, ['@zwa73/utils'], ['@types/node']);
50
50
  if (await UtilFT.pathExists(path.join(projectPath, "gitignore")))
51
51
  await fs.promises.rename(path.join(projectPath, "gitignore"), path.join(projectPath, ".gitignore"));
52
+ const packageJson = await UtilFT.loadJSONFile(path.join(projectPath, 'package.json'));
53
+ packageJson.name = opt.projectName;
54
+ packageJson.description = opt.projectDescription;
55
+ packageJson.author = opt.authorName;
56
+ await UtilFT.writeJSONFile(path.join(projectPath, 'package.json'), packageJson);
52
57
  switch (templateName) {
53
58
  case 'base': break;
54
59
  case 'electron': break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zwa73/dev-utils",
3
- "version": "1.0.85",
3
+ "version": "1.0.86",
4
4
  "description": "编译与调试工具",
5
5
  "exports": {
6
6
  ".": {
@@ -13,7 +13,8 @@
13
13
  "test": "jest",
14
14
  "release": "powershell scripts/release",
15
15
  "compile": "powershell scripts/compile",
16
- "watch": "powershell scripts/watch"
16
+ "watch": "powershell scripts/watch",
17
+ "copy-template": "ts-node scripts/copy-template"
17
18
  },
18
19
  "keywords": [
19
20
  "schema"
@@ -1,41 +0,0 @@
1
- /**
2
- {
3
- "env": {
4
- "browser": true,
5
- "es6": true,
6
- "node": true
7
- },
8
- "extends": [
9
- "eslint:recommended",
10
- "plugin:@typescript-eslint/eslint-recommended",
11
- "plugin:@typescript-eslint/recommended",
12
- "plugin:import/recommended",
13
- "plugin:import/electron",
14
- "plugin:import/typescript"
15
- ],
16
- "parser": "@typescript-eslint/parser"
17
- }
18
- */
19
- module.exports = {
20
- env: {
21
- browser: true,
22
- es6: true,
23
- node: true
24
- },
25
- parser: "@typescript-eslint/parser",
26
- parserOptions: { project: "tsconfig.json" },
27
- plugins: ["@typescript-eslint"],
28
- ignorePatterns: ["webpack.*","*.js", "dist/**"],
29
- overrides: [
30
- {
31
- files: [
32
- "src/**/*.{ts,tsx}"
33
- ],
34
- rules: {
35
- semi: ["error", "always"],
36
- "@typescript-eslint/promise-function-async": "error",
37
- "@typescript-eslint/no-floating-promises": "error",
38
- },
39
- },
40
- ],
41
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //UtilMacro.exportComment('src/**/*.ts');
@@ -1 +0,0 @@
1
- export {};
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const QuickFunc_1 = require("../QuickFunc");
4
- (0, QuickFunc_1.regionMacro)('macroTest1', "type Test1 = 1");
5
- (0, QuickFunc_1.regionMacro)('macroTest2', "type Test2 = 2");
6
- (0, QuickFunc_1.regionMacro)('macroTest3', "type Test3 = 3");
7
- (0, QuickFunc_1.commentMacro)('comment1', "type CM1 = 3");
8
- (0, QuickFunc_1.commentMacro)('comment2', "type CM2 = 3");
9
- (0, QuickFunc_1.regionMacro)('macroTest4', "type Test3 = 4", { filePath: 'src/test/**/*.ts', glob: true });
10
- (0, QuickFunc_1.fileMacro)("type FileMacro = 5", { filePath: 'src/test/testFileMacro.ts' });
11
- (0, QuickFunc_1.commentMacro)(/regexTest[\S]*/, ({ matchId: id }) => `type ${id} = "${id}"`);
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const QuickFunc_1 = require("../QuickFunc");
4
- (0, QuickFunc_1.commentMacro)('comment1', "type CM1 = 3");
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- export {};
2
- //UtilMacro.exportComment('src/**/*.ts');
@@ -1 +0,0 @@
1
- export {};
@@ -1,9 +0,0 @@
1
- import { commentMacro, fileMacro, regionMacro } from "../QuickFunc.js";
2
- regionMacro('macroTest1', "type Test1 = 1");
3
- regionMacro('macroTest2', "type Test2 = 2");
4
- regionMacro('macroTest3', "type Test3 = 3");
5
- commentMacro('comment1', "type CM1 = 3");
6
- commentMacro('comment2', "type CM2 = 3");
7
- regionMacro('macroTest4', "type Test3 = 4", { filePath: 'src/test/**/*.ts', glob: true });
8
- fileMacro("type FileMacro = 5", { filePath: 'src/test/testFileMacro.ts' });
9
- commentMacro(/regexTest[\S]*/, ({ matchId: id }) => `type ${id} = "${id}"`);
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- import { commentMacro } from "../QuickFunc.js";
2
- commentMacro('comment1', "type CM1 = 3");