@zwa73/dev-utils 1.0.62 → 1.0.64
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/data/CreateElectronFrame/package-lock.json +418 -2672
- package/data/CreateElectronFrame/package.json +0 -2
- package/data/CreateElectronFrame/tsconfig.json +31 -0
- package/data/init/tsconfig.compile.json +4 -0
- package/data/init/tsconfig.json +22 -0
- package/dist/Command/Init.js +1 -1
- package/dist/Command/InitElectron.d.ts +3 -0
- package/dist/Command/{CreateElectronFrame.js → InitElectron.js} +10 -6
- package/dist/Command/Route.js +2 -2
- package/package.json +1 -1
- package/src/Command/Init.ts +1 -1
- package/src/Command/{CreateElectronFrame.ts → InitElectron.ts} +11 -4
- package/src/Command/Route.ts +2 -2
- package/tsconfig.compile.json +4 -0
- package/tsconfig.json +22 -0
- package/dist/Command/CreateElectronFrame.d.ts +0 -3
@@ -0,0 +1,31 @@
|
|
1
|
+
{
|
2
|
+
"compilerOptions": {
|
3
|
+
"target": "ES6",
|
4
|
+
"allowJs": true,
|
5
|
+
"module": "commonjs",
|
6
|
+
"skipLibCheck": true,
|
7
|
+
"esModuleInterop": true,
|
8
|
+
"noImplicitAny": true,
|
9
|
+
"sourceMap": true,
|
10
|
+
"baseUrl": ".",
|
11
|
+
"outDir": "dist",
|
12
|
+
"moduleResolution": "node",
|
13
|
+
"resolveJsonModule": true,
|
14
|
+
"strict": true,
|
15
|
+
"jsx": "react-jsx",
|
16
|
+
"paths": {
|
17
|
+
"*": ["node_modules/*"],
|
18
|
+
"@/src/*": ["./src/*"],
|
19
|
+
"@/*": ["./*"],
|
20
|
+
"@": ["./src/index"],
|
21
|
+
"Static": ["./src/Static"],
|
22
|
+
"Component": ["./src/Component"]
|
23
|
+
}
|
24
|
+
},
|
25
|
+
"include": [
|
26
|
+
"./src/**/*.ts",
|
27
|
+
"./src/**/*.tsx",
|
28
|
+
"webpack.plugins.ts"
|
29
|
+
],
|
30
|
+
"exclude": ["./node_modules/**/*"]
|
31
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
{
|
2
|
+
"compilerOptions": {
|
3
|
+
"allowJs": true,
|
4
|
+
"strict": true,
|
5
|
+
"target": "ES2022",
|
6
|
+
"module": "CommonJS",
|
7
|
+
"moduleResolution": "node",
|
8
|
+
"esModuleInterop": true,
|
9
|
+
"outDir": "./dist",
|
10
|
+
"declaration": true,
|
11
|
+
"baseUrl": ".",
|
12
|
+
"emitDecoratorMetadata": true,
|
13
|
+
"experimentalDecorators": true,
|
14
|
+
"paths": {
|
15
|
+
"@src/*": ["./src/*"],
|
16
|
+
"@/*": ["./*"],
|
17
|
+
"@": ["./src/index"]
|
18
|
+
}
|
19
|
+
},
|
20
|
+
"include": ["./src/**/*.ts", "./src/**/*.js", "./jest/**/*.ts"],
|
21
|
+
"exclude": ["./node_modules/**/*"]
|
22
|
+
}
|
package/dist/Command/Init.js
CHANGED
@@ -26,12 +26,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
27
27
|
};
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
29
|
-
exports.
|
29
|
+
exports.CmdInitElectron = void 0;
|
30
30
|
const fs = __importStar(require("fs"));
|
31
31
|
const pathe_1 = __importDefault(require("pathe"));
|
32
32
|
const utils_1 = require("@zwa73/utils");
|
33
33
|
const RouteInterface_1 = require("./RouteInterface");
|
34
34
|
const InitDataPath = pathe_1.default.join(RouteInterface_1.DATA_PATH, 'CreateElectronFrame');
|
35
|
+
(async () => {
|
36
|
+
const filelist = await fs.promises.readdir(InitDataPath);
|
37
|
+
console.log(filelist);
|
38
|
+
})();
|
35
39
|
/**复制基础文件 */
|
36
40
|
async function copyData() {
|
37
41
|
const filelist = await fs.promises.readdir(InitDataPath);
|
@@ -48,16 +52,16 @@ async function copyData() {
|
|
48
52
|
await Promise.all(plist);
|
49
53
|
}
|
50
54
|
/**对项目进行初始化 */
|
51
|
-
const
|
52
|
-
.command('
|
53
|
-
.
|
55
|
+
const CmdInitElectron = (program) => program
|
56
|
+
.command('Init-Electron')
|
57
|
+
.alias('initelectron')
|
54
58
|
.description('对当前目录进行项目初始化,创建Electron基础环境')
|
55
59
|
.action(async (opt) => {
|
56
|
-
|
60
|
+
//checkProject();
|
57
61
|
utils_1.SLogger.info(`开始初始化设置当前目录 ${RouteInterface_1.PROJECT_PATH}`);
|
58
62
|
await Promise.all([
|
59
63
|
copyData(),
|
60
64
|
utils_1.UtilFunc.exec(`npm install --registry ${RouteInterface_1.MIRROR_SOURCE}`)
|
61
65
|
]);
|
62
66
|
});
|
63
|
-
exports.
|
67
|
+
exports.CmdInitElectron = CmdInitElectron;
|
package/dist/Command/Route.js
CHANGED
@@ -10,9 +10,10 @@ const ScanDups_1 = require("./ScanDups");
|
|
10
10
|
const GenSchema_1 = require("./GenSchema");
|
11
11
|
const ExpandMacro_1 = require("./ExpandMacro");
|
12
12
|
const GenI18n_1 = require("./GenI18n");
|
13
|
-
const
|
13
|
+
const InitElectron_1 = require("./InitElectron");
|
14
14
|
async function cliRoute() {
|
15
15
|
(0, Init_1.CmdInit)(commander_1.program);
|
16
|
+
(0, InitElectron_1.CmdInitElectron)(commander_1.program);
|
16
17
|
(0, Node_1.CmdNode)(commander_1.program);
|
17
18
|
(0, Release_1.CmdRelease)(commander_1.program);
|
18
19
|
(0, MapPath_1.CmdMapPath)(commander_1.program);
|
@@ -20,6 +21,5 @@ async function cliRoute() {
|
|
20
21
|
(0, GenSchema_1.CmdGenSchema)(commander_1.program);
|
21
22
|
(0, ExpandMacro_1.CmdExpandMacro)(commander_1.program);
|
22
23
|
(0, GenI18n_1.CmdGenI18n)(commander_1.program);
|
23
|
-
(0, CreateElectronFrame_1.CmdCreateElectronFrame)(commander_1.program);
|
24
24
|
commander_1.program.parse(process.argv);
|
25
25
|
}
|
package/package.json
CHANGED
package/src/Command/Init.ts
CHANGED
@@ -9,6 +9,13 @@ import { checkProject, DATA_PATH, MIRROR_SOURCE, PROJECT_PATH } from './RouteInt
|
|
9
9
|
|
10
10
|
const InitDataPath = path.join(DATA_PATH,'CreateElectronFrame');
|
11
11
|
|
12
|
+
(async ()=>{
|
13
|
+
|
14
|
+
|
15
|
+
const filelist = await fs.promises.readdir(InitDataPath);
|
16
|
+
console.log(filelist);
|
17
|
+
})();
|
18
|
+
|
12
19
|
/**复制基础文件 */
|
13
20
|
async function copyData() {
|
14
21
|
const filelist = await fs.promises.readdir(InitDataPath);
|
@@ -26,12 +33,12 @@ async function copyData() {
|
|
26
33
|
}
|
27
34
|
|
28
35
|
/**对项目进行初始化 */
|
29
|
-
export const
|
30
|
-
.command('
|
31
|
-
.
|
36
|
+
export const CmdInitElectron = (program:Command)=>program
|
37
|
+
.command('Init-Electron')
|
38
|
+
.alias('initelectron')
|
32
39
|
.description('对当前目录进行项目初始化,创建Electron基础环境')
|
33
40
|
.action(async (opt) => {
|
34
|
-
checkProject();
|
41
|
+
//checkProject();
|
35
42
|
SLogger.info(`开始初始化设置当前目录 ${PROJECT_PATH}`);
|
36
43
|
await Promise.all([
|
37
44
|
copyData(),
|
package/src/Command/Route.ts
CHANGED
@@ -8,10 +8,11 @@ import { CmdScanDups } from './ScanDups';
|
|
8
8
|
import { CmdGenSchema } from './GenSchema';
|
9
9
|
import { CmdExpandMacro } from './ExpandMacro';
|
10
10
|
import { CmdGenI18n } from './GenI18n';
|
11
|
-
import {
|
11
|
+
import { CmdInitElectron } from './InitElectron';
|
12
12
|
|
13
13
|
export async function cliRoute(){
|
14
14
|
CmdInit(program);
|
15
|
+
CmdInitElectron(program);
|
15
16
|
CmdNode(program);
|
16
17
|
CmdRelease(program);
|
17
18
|
CmdMapPath(program);
|
@@ -19,6 +20,5 @@ export async function cliRoute(){
|
|
19
20
|
CmdGenSchema(program);
|
20
21
|
CmdExpandMacro(program);
|
21
22
|
CmdGenI18n(program);
|
22
|
-
CmdCreateElectronFrame(program);
|
23
23
|
program.parse(process.argv);
|
24
24
|
}
|
package/tsconfig.json
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
{
|
2
|
+
"compilerOptions": {
|
3
|
+
"allowJs": true,
|
4
|
+
"strict": true,
|
5
|
+
"target": "ES2022",
|
6
|
+
"module": "commonjs",
|
7
|
+
"moduleResolution": "node",
|
8
|
+
"esModuleInterop": true,
|
9
|
+
"outDir": "./dist",
|
10
|
+
"declaration": true,
|
11
|
+
"baseUrl": ".",
|
12
|
+
"emitDecoratorMetadata": true,
|
13
|
+
"experimentalDecorators": true,
|
14
|
+
"paths": {
|
15
|
+
"@src/*": ["./src/*"],
|
16
|
+
"@/*" : ["./*"],
|
17
|
+
"@" : ["./src/index"]
|
18
|
+
}
|
19
|
+
},
|
20
|
+
"include": ["./src/**/*.ts", "./src/**/*.js","./jest/**/*.ts"],
|
21
|
+
"exclude": ["./node_modules/**/*"]
|
22
|
+
}
|