@gct-paas/cli 0.0.1-dev.7.2 → 0.0.1-dev.9
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/dist/commands/index.cjs +0 -6
- package/dist/index.cjs +1 -1
- package/es/commands/index.mjs +0 -6
- package/es/index.mjs +1 -1
- package/package.json +11 -53
- package/dist/commands/create-template/create-template.cjs +0 -37
- package/dist/commands/create-template/create-template.d.ts +0 -6
- package/dist/commands/update-template/update-template.cjs +0 -25
- package/dist/commands/update-template/update-template.d.ts +0 -6
- package/dist/commands/zip/zip.cjs +0 -16
- package/dist/commands/zip/zip.d.ts +0 -21
- package/dist/core/commitlint/commitlint-config/commitlint-config.cjs +0 -15
- package/dist/core/commitlint/commitlint-config/commitlint-config.d.ts +0 -9
- package/dist/core/commitlint/index.cjs +0 -12
- package/dist/core/commitlint/index.d.ts +0 -1
- package/dist/core/constants/index.cjs +0 -9
- package/dist/core/constants/index.d.ts +0 -12
- package/dist/core/eslint/eslint-config/eslint-config.cjs +0 -85
- package/dist/core/eslint/eslint-config/eslint-config.d.ts +0 -9
- package/dist/core/eslint/index.cjs +0 -12
- package/dist/core/eslint/index.d.ts +0 -1
- package/dist/core/index.cjs +0 -93
- package/dist/core/index.d.ts +0 -8
- package/dist/core/prettier/index.cjs +0 -12
- package/dist/core/prettier/index.d.ts +0 -1
- package/dist/core/prettier/prettier-config/prettier-config.cjs +0 -29
- package/dist/core/prettier/prettier-config/prettier-config.d.ts +0 -22
- package/dist/core/rollup/index.cjs +0 -27
- package/dist/core/rollup/index.d.ts +0 -2
- package/dist/core/rollup/rollup-config/dev-config.cjs +0 -93
- package/dist/core/rollup/rollup-config/dev-config.d.ts +0 -9
- package/dist/core/rollup/rollup-plugins/copy-file.cjs +0 -24
- package/dist/core/rollup/rollup-plugins/copy-file.d.ts +0 -37
- package/dist/core/rollup/rollup-plugins/ignore-compiler-file.cjs +0 -23
- package/dist/core/rollup/rollup-plugins/ignore-compiler-file.d.ts +0 -8
- package/dist/core/rollup/rollup-plugins/index.cjs +0 -19
- package/dist/core/rollup/rollup-plugins/index.d.ts +0 -2
- package/dist/core/stylelint/index.cjs +0 -12
- package/dist/core/stylelint/index.d.ts +0 -1
- package/dist/core/stylelint/stylelint-config/stylelint-config.cjs +0 -24
- package/dist/core/stylelint/stylelint-config/stylelint-config.d.ts +0 -9
- package/dist/core/template/actions/create-template.cjs +0 -53
- package/dist/core/template/actions/create-template.d.ts +0 -16
- package/dist/core/template/actions/update-template.cjs +0 -71
- package/dist/core/template/actions/update-template.d.ts +0 -18
- package/dist/core/template/actions/zip.cjs +0 -25
- package/dist/core/template/actions/zip.d.ts +0 -9
- package/dist/core/template/constant/index.cjs +0 -7
- package/dist/core/template/constant/index.d.ts +0 -1
- package/dist/core/template/index.cjs +0 -26
- package/dist/core/template/index.d.ts +0 -3
- package/dist/core/util/index.cjs +0 -20
- package/dist/core/util/index.d.ts +0 -17
- package/dist/core/util/watcher/watcher.cjs +0 -99
- package/dist/core/util/watcher/watcher.d.ts +0 -48
- package/dist/core/vite/index.cjs +0 -45
- package/dist/core/vite/index.d.ts +0 -4
- package/dist/core/vite/vite-config/vite-base-config.cjs +0 -47
- package/dist/core/vite/vite-config/vite-base-config.d.ts +0 -9
- package/dist/core/vite/vite-config/vite-config.cjs +0 -35
- package/dist/core/vite/vite-config/vite-config.d.ts +0 -9
- package/dist/core/vite/vite-config/vite-dev-config.cjs +0 -23
- package/dist/core/vite/vite-config/vite-dev-config.d.ts +0 -9
- package/dist/core/vite/vite-config/vite-plugin-config.cjs +0 -97
- package/dist/core/vite/vite-config/vite-plugin-config.d.ts +0 -25
- package/es/commands/create-template/create-template.d.ts +0 -6
- package/es/commands/create-template/create-template.mjs +0 -29
- package/es/commands/update-template/update-template.d.ts +0 -6
- package/es/commands/update-template/update-template.mjs +0 -17
- package/es/commands/zip/zip.d.ts +0 -21
- package/es/commands/zip/zip.mjs +0 -9
- package/es/core/commitlint/commitlint-config/commitlint-config.d.ts +0 -9
- package/es/core/commitlint/commitlint-config/commitlint-config.mjs +0 -28
- package/es/core/commitlint/index.d.ts +0 -1
- package/es/core/commitlint/index.mjs +0 -1
- package/es/core/constants/index.d.ts +0 -12
- package/es/core/constants/index.mjs +0 -24
- package/es/core/eslint/eslint-config/eslint-config.d.ts +0 -9
- package/es/core/eslint/eslint-config/eslint-config.mjs +0 -109
- package/es/core/eslint/index.d.ts +0 -1
- package/es/core/eslint/index.mjs +0 -1
- package/es/core/index.d.ts +0 -8
- package/es/core/index.mjs +0 -8
- package/es/core/prettier/index.d.ts +0 -1
- package/es/core/prettier/index.mjs +0 -1
- package/es/core/prettier/prettier-config/prettier-config.d.ts +0 -22
- package/es/core/prettier/prettier-config/prettier-config.mjs +0 -26
- package/es/core/rollup/index.d.ts +0 -2
- package/es/core/rollup/index.mjs +0 -2
- package/es/core/rollup/rollup-config/dev-config.d.ts +0 -9
- package/es/core/rollup/rollup-config/dev-config.mjs +0 -101
- package/es/core/rollup/rollup-plugins/copy-file.d.ts +0 -37
- package/es/core/rollup/rollup-plugins/copy-file.mjs +0 -18
- package/es/core/rollup/rollup-plugins/ignore-compiler-file.d.ts +0 -8
- package/es/core/rollup/rollup-plugins/ignore-compiler-file.mjs +0 -17
- package/es/core/rollup/rollup-plugins/index.d.ts +0 -2
- package/es/core/rollup/rollup-plugins/index.mjs +0 -2
- package/es/core/stylelint/index.d.ts +0 -1
- package/es/core/stylelint/index.mjs +0 -1
- package/es/core/stylelint/stylelint-config/stylelint-config.d.ts +0 -9
- package/es/core/stylelint/stylelint-config/stylelint-config.mjs +0 -21
- package/es/core/template/actions/create-template.d.ts +0 -16
- package/es/core/template/actions/create-template.mjs +0 -43
- package/es/core/template/actions/update-template.d.ts +0 -18
- package/es/core/template/actions/update-template.mjs +0 -61
- package/es/core/template/actions/zip.d.ts +0 -9
- package/es/core/template/actions/zip.mjs +0 -13
- package/es/core/template/constant/index.d.ts +0 -1
- package/es/core/template/constant/index.mjs +0 -1
- package/es/core/template/index.d.ts +0 -3
- package/es/core/template/index.mjs +0 -3
- package/es/core/util/index.d.ts +0 -17
- package/es/core/util/index.mjs +0 -7
- package/es/core/util/watcher/watcher.d.ts +0 -48
- package/es/core/util/watcher/watcher.mjs +0 -97
- package/es/core/vite/index.d.ts +0 -4
- package/es/core/vite/index.mjs +0 -8
- package/es/core/vite/vite-config/vite-base-config.d.ts +0 -9
- package/es/core/vite/vite-config/vite-base-config.mjs +0 -53
- package/es/core/vite/vite-config/vite-config.d.ts +0 -9
- package/es/core/vite/vite-config/vite-config.mjs +0 -31
- package/es/core/vite/vite-config/vite-dev-config.d.ts +0 -9
- package/es/core/vite/vite-config/vite-dev-config.mjs +0 -19
- package/es/core/vite/vite-config/vite-plugin-config.d.ts +0 -25
- package/es/core/vite/vite-config/vite-plugin-config.mjs +0 -97
package/dist/commands/index.cjs
CHANGED
|
@@ -5,14 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.CommandLoader = void 0;
|
|
7
7
|
var _consola = require("consola");
|
|
8
|
-
var _createTemplate = require("./create-template/create-template.cjs");
|
|
9
|
-
var _updateTemplate = require("./update-template/update-template.cjs");
|
|
10
|
-
var _zip = require("./zip/zip.cjs");
|
|
11
8
|
class CommandLoader {
|
|
12
9
|
static load(program) {
|
|
13
|
-
new _createTemplate.CreateTemplateCommand().load(program);
|
|
14
|
-
new _updateTemplate.UpdateTemplateCommand().load(program);
|
|
15
|
-
new _zip.ZipCommand().load(program);
|
|
16
10
|
this.handleInvalidCommand(program);
|
|
17
11
|
}
|
|
18
12
|
static handleInvalidCommand(program) {
|
package/dist/index.cjs
CHANGED
|
@@ -11,7 +11,7 @@ var _commander = require("commander");
|
|
|
11
11
|
var _commands = require("./commands/index.cjs");
|
|
12
12
|
var _utils = require("./utils/index.cjs");
|
|
13
13
|
var _package = _interopRequireDefault(require("../package.json"));
|
|
14
|
-
var _core = require("./core
|
|
14
|
+
var _core = require("./core");
|
|
15
15
|
Object.keys(_core).forEach(function (key) {
|
|
16
16
|
if (key === "default" || key === "__esModule") return;
|
|
17
17
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
package/es/commands/index.mjs
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import { consola } from "consola";
|
|
2
|
-
import { CreateTemplateCommand } from "./create-template/create-template.mjs";
|
|
3
|
-
import { UpdateTemplateCommand } from "./update-template/update-template.mjs";
|
|
4
|
-
import { ZipCommand } from "./zip/zip.mjs";
|
|
5
2
|
export class CommandLoader {
|
|
6
3
|
static load(program) {
|
|
7
|
-
new CreateTemplateCommand().load(program);
|
|
8
|
-
new UpdateTemplateCommand().load(program);
|
|
9
|
-
new ZipCommand().load(program);
|
|
10
4
|
this.handleInvalidCommand(program);
|
|
11
5
|
}
|
|
12
6
|
static handleInvalidCommand(program) {
|
package/es/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gct-paas/cli",
|
|
3
|
-
"version": "0.0.1-dev.
|
|
3
|
+
"version": "0.0.1-dev.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "paas 平台核心包",
|
|
6
6
|
"bin": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"main": "dist/index.cjs",
|
|
10
10
|
"module": "es/index.mjs",
|
|
11
|
-
"types": "
|
|
11
|
+
"types": "es/index.d.ts",
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|
|
14
14
|
"types": "./es/index.d.ts",
|
|
@@ -42,65 +42,23 @@
|
|
|
42
42
|
"publish:npm": "npm run build && npm publish --access public --registry=https://registry.npmjs.org/"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@babel/core": "^7.26.0",
|
|
46
|
-
"@babel/preset-env": "^7.26.0",
|
|
47
|
-
"@commitlint/cli": "^19.6.1",
|
|
48
|
-
"@commitlint/config-conventional": "^19.6.0",
|
|
49
|
-
"@eslint/js": "^9.17.0",
|
|
50
|
-
"@gct-paas/scss": "*",
|
|
51
45
|
"@inquirer/prompts": "^7.3.1",
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"@rollup/plugin-eslint": "^9.0.5",
|
|
55
|
-
"@rollup/plugin-json": "^6.1.0",
|
|
56
|
-
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
57
|
-
"@rollup/plugin-typescript": "^12.1.2",
|
|
58
|
-
"@vitejs/plugin-vue": "^5.2.1",
|
|
59
|
-
"@vitejs/plugin-vue-jsx": "^4.1.1",
|
|
60
|
-
"@vue/compiler-sfc": "^3.5.13",
|
|
61
|
-
"archiver": "^7.0.1",
|
|
62
|
-
"chokidar": "^4.0.3",
|
|
63
|
-
"commander": "^13.0.0",
|
|
64
|
-
"consola": "^3.3.3",
|
|
65
|
-
"copy-file": "^11.0.0",
|
|
46
|
+
"commander": "^13.1.0",
|
|
47
|
+
"consola": "^3.4.0",
|
|
66
48
|
"core-js": "^3.40.0",
|
|
67
|
-
"cpy": "^11.1.0",
|
|
68
|
-
"crypto": "^1.0.1",
|
|
69
|
-
"esbuild": "^0.24.2",
|
|
70
|
-
"eslint": "^9.17.0",
|
|
71
|
-
"eslint-config-prettier": "^9.1.0",
|
|
72
|
-
"eslint-plugin-import": "^2.31.0",
|
|
73
|
-
"eslint-plugin-prettier": "^5.2.1",
|
|
74
|
-
"eslint-plugin-unused-imports": "^4.1.4",
|
|
75
|
-
"eslint-plugin-vue": "^9.32.0",
|
|
76
49
|
"fast-glob": "^3.3.3",
|
|
77
|
-
"fs-extra": "^11.
|
|
78
|
-
"globals": "^15.14.0",
|
|
50
|
+
"fs-extra": "^11.3.0",
|
|
79
51
|
"lodash-es": "^4.17.21",
|
|
80
52
|
"ora": "^8.2.0",
|
|
81
53
|
"picocolors": "^1.1.1",
|
|
82
|
-
"
|
|
83
|
-
"rimraf": "^6.0.1",
|
|
84
|
-
"rollup": "^4.30.0",
|
|
85
|
-
"rollup-plugin-esbuild": "^6.1.1",
|
|
86
|
-
"simple-git": "^3.27.0",
|
|
87
|
-
"stylelint": "^16.12.0",
|
|
88
|
-
"stylelint-config-standard": "^36.0.1",
|
|
89
|
-
"stylelint-config-standard-scss": "^14.0.0",
|
|
90
|
-
"typescript-eslint": "^8.19.0",
|
|
91
|
-
"vite": "^6.0.7",
|
|
92
|
-
"vite-plugin-dts": "^4.4.0",
|
|
93
|
-
"vue-tsc": "^2.2.0"
|
|
54
|
+
"rimraf": "^6.0.1"
|
|
94
55
|
},
|
|
95
56
|
"devDependencies": {
|
|
96
|
-
"@commitlint/types": "^19.5.0",
|
|
97
|
-
"@types/archiver": "^6.0.3",
|
|
98
|
-
"@types/babel__core": "^7.20.5",
|
|
99
|
-
"@types/babel__preset-env": "^7.9.7",
|
|
100
57
|
"@types/fs-extra": "^11.0.4",
|
|
101
58
|
"@types/lodash-es": "^4.17.12",
|
|
102
|
-
"@types/node": "^22.
|
|
103
|
-
"typescript": "^5.7.
|
|
104
|
-
"unbuild": "^3.
|
|
105
|
-
}
|
|
59
|
+
"@types/node": "^22.13.1",
|
|
60
|
+
"typescript": "^5.7.3",
|
|
61
|
+
"unbuild": "^3.3.1"
|
|
62
|
+
},
|
|
63
|
+
"gitHead": "5b6a55913fb534d713b2726839ac7b365b551c84"
|
|
106
64
|
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.CreateTemplateCommand = void 0;
|
|
7
|
-
var _fsExtra = _interopRequireDefault(require("fs-extra"));
|
|
8
|
-
var _ora = _interopRequireDefault(require("ora"));
|
|
9
|
-
var _prompts = require("@inquirer/prompts");
|
|
10
|
-
var _core = require("../../core/index.cjs");
|
|
11
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
-
class CreateTemplateCommand {
|
|
13
|
-
load(program) {
|
|
14
|
-
program.command("create-template").description("\u57FA\u4E8E\u6A21\u677F\u521B\u5EFA paas \u5E73\u53F0\u63D2\u4EF6").action(this.action.bind(this));
|
|
15
|
-
}
|
|
16
|
-
async action() {
|
|
17
|
-
const cwd = process.cwd();
|
|
18
|
-
const child = _fsExtra.default.readdirSync(cwd);
|
|
19
|
-
if (child.length > 0) {
|
|
20
|
-
const bol = await (0, _prompts.confirm)({
|
|
21
|
-
message: "\u5F53\u524D\u76EE\u5F55\u4E0D\u4E3A\u7A7A\uFF0C\u7EE7\u7EED\u5C06\u53EF\u80FD\u8986\u76D6\u5DF2\u6709\u6587\u4EF6\uFF0C\u662F\u5426\u7EE7\u7EED\u521B\u5EFA\uFF1F",
|
|
22
|
-
default: false
|
|
23
|
-
});
|
|
24
|
-
if (bol === false) {
|
|
25
|
-
process.exit();
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
const name = await (0, _prompts.input)({
|
|
29
|
-
message: "\u8BF7\u8F93\u5165\u63D2\u4EF6\u540D\u79F0",
|
|
30
|
-
default: "gct-plugin"
|
|
31
|
-
});
|
|
32
|
-
const spinner = (0, _ora.default)("\u521D\u59CB\u5316\u63D2\u4EF6").start();
|
|
33
|
-
await new _core.CreateTemplateAction().run(process.cwd(), name);
|
|
34
|
-
spinner.succeed("\u521D\u59CB\u5316\u5B8C\u6210");
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
exports.CreateTemplateCommand = CreateTemplateCommand;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.UpdateTemplateCommand = void 0;
|
|
7
|
-
var _ora = _interopRequireDefault(require("ora"));
|
|
8
|
-
var _prompts = require("@inquirer/prompts");
|
|
9
|
-
var _core = require("../../core/index.cjs");
|
|
10
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
-
class UpdateTemplateCommand {
|
|
12
|
-
load(program) {
|
|
13
|
-
program.command("update-template").description("paas \u5E73\u53F0\u63D2\u4EF6\u589E\u91CF\u66F4\u65B0").action(this.action.bind(this));
|
|
14
|
-
}
|
|
15
|
-
async action() {
|
|
16
|
-
const overwrite = await (0, _prompts.confirm)({
|
|
17
|
-
message: "\u66F4\u65B0\u65F6\u9009\u62E9\u4E0D\u8986\u76D6\uFF0C\u53EF\u4FDD\u7559\u5DF2\u4FEE\u6539\u7684\u6587\u4EF6\u800C\u4E0D\u88AB\u65B0\u7248\u672C\u66FF\u6362\u3002\u662F\u5426\u8986\u76D6\u66F4\u65B0\uFF1F",
|
|
18
|
-
default: false
|
|
19
|
-
});
|
|
20
|
-
const spinner = (0, _ora.default)("\u589E\u91CF\u66F4\u65B0\u63D2\u4EF6").start();
|
|
21
|
-
await new _core.UpdateTemplateAction().run(process.cwd(), overwrite);
|
|
22
|
-
spinner.succeed("\u66F4\u65B0\u5B8C\u6210");
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
exports.UpdateTemplateCommand = UpdateTemplateCommand;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.ZipCommand = void 0;
|
|
7
|
-
var _core = require("../../core/index.cjs");
|
|
8
|
-
class ZipCommand {
|
|
9
|
-
load(program) {
|
|
10
|
-
program.command("zip").description("zip \u538B\u7F29\u76EE\u5F55").option("--folder <folder-path>", "\u5F85\u538B\u7F29\u76EE\u5F55").option("--output <output-file>", "\u8F93\u51FA\u6587\u4EF6\u540D").action(this.action.bind(this));
|
|
11
|
-
}
|
|
12
|
-
async action(args) {
|
|
13
|
-
new _core.ZipAction().run(process.cwd(), args.folder, args.output);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.ZipCommand = ZipCommand;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Command } from 'commander';
|
|
2
|
-
import { ICommand } from '../../interface';
|
|
3
|
-
interface ZipCommandParams {
|
|
4
|
-
/**
|
|
5
|
-
* 待压缩目录
|
|
6
|
-
*
|
|
7
|
-
* @type {string}
|
|
8
|
-
*/
|
|
9
|
-
folder: string;
|
|
10
|
-
/**
|
|
11
|
-
* 输出文件名
|
|
12
|
-
*
|
|
13
|
-
* @type {string}
|
|
14
|
-
*/
|
|
15
|
-
output: string;
|
|
16
|
-
}
|
|
17
|
-
export declare class ZipCommand implements ICommand {
|
|
18
|
-
load(program: Command): void;
|
|
19
|
-
action(args: ZipCommandParams): Promise<void>;
|
|
20
|
-
}
|
|
21
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.defineCommitlintConfig = defineCommitlintConfig;
|
|
7
|
-
var _lodashEs = require("lodash-es");
|
|
8
|
-
function defineCommitlintConfig(config = {}) {
|
|
9
|
-
return (0, _lodashEs.merge)({
|
|
10
|
-
extends: ["@commitlint/config-conventional"],
|
|
11
|
-
rules: {
|
|
12
|
-
"type-enum": [2, "always", ["feat", "fix", "docs", "style", "refactor", "test", "perf", "revert", "build", "chore", "release"]]
|
|
13
|
-
}
|
|
14
|
-
}, config);
|
|
15
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "defineCommitlintConfig", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _commitlintConfig.defineCommitlintConfig;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
var _commitlintConfig = require("./commitlint-config/commitlint-config.cjs");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { defineCommitlintConfig } from './commitlint-config/commitlint-config';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.PROD_MODE = exports.DEV_MODE = exports.DEFAULT_EXTERNAL = void 0;
|
|
7
|
-
const DEV_MODE = exports.DEV_MODE = "development";
|
|
8
|
-
const PROD_MODE = exports.PROD_MODE = "production";
|
|
9
|
-
const DEFAULT_EXTERNAL = exports.DEFAULT_EXTERNAL = ["vue", "vue-router", "vue-i18n", "axios", "dayjs", "lodash-es", "qs", "pinia", "vuedraggable", "sortablejs", "vue-grid-layout", "vant", "ant-design-vue", "@gct-paas/core", "@gct-paas/design", "@gct-paas/design-mobile", "@gct-paas/design-web", "@gct-paas/mobile", "@gct-paas/web", "systemjs"];
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 开发模式标识,匹配环境变量中的 NODE_ENV
|
|
3
|
-
*/
|
|
4
|
-
export declare const DEV_MODE = "development";
|
|
5
|
-
/**
|
|
6
|
-
* 生产编译模式标识,匹配环境变量中的 NODE_ENV
|
|
7
|
-
*/
|
|
8
|
-
export declare const PROD_MODE = "production";
|
|
9
|
-
/**
|
|
10
|
-
* 默认需要忽略编译的外部依赖
|
|
11
|
-
*/
|
|
12
|
-
export declare const DEFAULT_EXTERNAL: string[];
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.defineEslintConfig = defineEslintConfig;
|
|
7
|
-
var _js = _interopRequireDefault(require("@eslint/js"));
|
|
8
|
-
var _typescriptEslint = _interopRequireDefault(require("typescript-eslint"));
|
|
9
|
-
var _eslintPluginVue = _interopRequireDefault(require("eslint-plugin-vue"));
|
|
10
|
-
var _recommended = _interopRequireDefault(require("eslint-plugin-prettier/recommended"));
|
|
11
|
-
var _eslintPluginUnusedImports = _interopRequireDefault(require("eslint-plugin-unused-imports"));
|
|
12
|
-
var _eslintPluginImport = _interopRequireDefault(require("eslint-plugin-import"));
|
|
13
|
-
var _globals = _interopRequireDefault(require("globals"));
|
|
14
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
-
function defineEslintConfig(...configs) {
|
|
16
|
-
return _typescriptEslint.default.config(/** js推荐配置 */
|
|
17
|
-
_js.default.configs.recommended, /** ts推荐配置 */
|
|
18
|
-
_typescriptEslint.default.configs.strict, _typescriptEslint.default.configs.stylistic, /** vue推荐配置 */
|
|
19
|
-
_eslintPluginVue.default.configs["flat/recommended"], _recommended.default, _eslintPluginImport.default.flatConfigs.recommended, _eslintPluginImport.default.flatConfigs.warnings, _eslintPluginImport.default.flatConfigs.errors, _eslintPluginImport.default.flatConfigs.typescript, {
|
|
20
|
-
ignores: ["**/node_modules", "lerna.json", "package.json", "tsconfig.json", "pnpm-lock.yaml", "pnpm-workspace.yaml", "eslint.config.mjs", "**/dist", "**/out", "**/es", "**/lib"],
|
|
21
|
-
files: ["**/*.ts", "**.*.tsx", "**/*.vue"],
|
|
22
|
-
plugins: {
|
|
23
|
-
"unused-imports": _eslintPluginUnusedImports.default
|
|
24
|
-
},
|
|
25
|
-
languageOptions: {
|
|
26
|
-
globals: {
|
|
27
|
-
..._globals.default.browser
|
|
28
|
-
},
|
|
29
|
-
parserOptions: {
|
|
30
|
-
ecmaFeatures: {
|
|
31
|
-
// 全局严格模式
|
|
32
|
-
impliedStrict: true,
|
|
33
|
-
// 启用 jsx
|
|
34
|
-
jsx: true
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
rules: {
|
|
39
|
-
// 基础配置覆盖
|
|
40
|
-
"no-console": "off",
|
|
41
|
-
"no-debugger": "off",
|
|
42
|
-
"no-undef": "off",
|
|
43
|
-
"no-plusplus": ["error", {
|
|
44
|
-
allowForLoopAfterthoughts: true
|
|
45
|
-
}],
|
|
46
|
-
"no-underscore-dangle": "off",
|
|
47
|
-
"no-restricted-syntax": "off",
|
|
48
|
-
"no-continue": "off",
|
|
49
|
-
"no-unused-vars": "off",
|
|
50
|
-
"no-extraneous-class": "off",
|
|
51
|
-
"no-param-reassign": "off",
|
|
52
|
-
"no-useless-constructor": "off",
|
|
53
|
-
"no-empty-function": "off",
|
|
54
|
-
// unused-imports 配置覆盖
|
|
55
|
-
"unused-imports/no-unused-imports": "error",
|
|
56
|
-
"consistent-return": "off",
|
|
57
|
-
"func-names": "off",
|
|
58
|
-
// import 配置覆盖
|
|
59
|
-
"import/no-unresolved": "off",
|
|
60
|
-
"import/extensions": "off",
|
|
61
|
-
"import/prefer-default-export": "off",
|
|
62
|
-
// vue 配置覆盖
|
|
63
|
-
"vue/no-setup-props-destructure": "off",
|
|
64
|
-
"vue/require-default-prop": "off",
|
|
65
|
-
// typescript 配置覆盖
|
|
66
|
-
"@typescript-eslint/no-unused-vars": ["error", {
|
|
67
|
-
argsIgnorePattern: "^_"
|
|
68
|
-
}],
|
|
69
|
-
"@typescript-eslint/no-inferrable-types": "off",
|
|
70
|
-
"@typescript-eslint/no-explicit-any": ["error"],
|
|
71
|
-
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
72
|
-
"@typescript-eslint/no-non-null-assertion": "off",
|
|
73
|
-
"@typescript-eslint/no-extraneous-class": "off",
|
|
74
|
-
// 其他配置覆盖
|
|
75
|
-
"class-methods-use-this": "off",
|
|
76
|
-
"prefer-destructuring": "off"
|
|
77
|
-
}
|
|
78
|
-
}, {
|
|
79
|
-
name: "ts-vue-override",
|
|
80
|
-
files: ["**/*.vue"],
|
|
81
|
-
rules: {
|
|
82
|
-
"@typescript-eslint/no-unused-vars": "off"
|
|
83
|
-
}
|
|
84
|
-
}, ...configs);
|
|
85
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ConfigArray, InfiniteDepthConfigWithExtends } from 'typescript-eslint';
|
|
2
|
-
/**
|
|
3
|
-
* 基于基础规则,定义 eslint 配置
|
|
4
|
-
*
|
|
5
|
-
* @export
|
|
6
|
-
* @param {...InfiniteDepthConfigWithExtends[]} configs
|
|
7
|
-
* @returns {*} {ConfigArray}
|
|
8
|
-
*/
|
|
9
|
-
export declare function defineEslintConfig(...configs: InfiniteDepthConfigWithExtends[]): ConfigArray;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "defineEslintConfig", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _eslintConfig.defineEslintConfig;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
var _eslintConfig = require("./eslint-config/eslint-config.cjs");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { defineEslintConfig } from './eslint-config/eslint-config';
|
package/dist/core/index.cjs
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _commitlint = require("./commitlint/index.cjs");
|
|
7
|
-
Object.keys(_commitlint).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _commitlint[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () {
|
|
13
|
-
return _commitlint[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
var _eslint = require("./eslint/index.cjs");
|
|
18
|
-
Object.keys(_eslint).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _eslint[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () {
|
|
24
|
-
return _eslint[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
var _prettier = require("./prettier/index.cjs");
|
|
29
|
-
Object.keys(_prettier).forEach(function (key) {
|
|
30
|
-
if (key === "default" || key === "__esModule") return;
|
|
31
|
-
if (key in exports && exports[key] === _prettier[key]) return;
|
|
32
|
-
Object.defineProperty(exports, key, {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
get: function () {
|
|
35
|
-
return _prettier[key];
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
var _rollup = require("./rollup/index.cjs");
|
|
40
|
-
Object.keys(_rollup).forEach(function (key) {
|
|
41
|
-
if (key === "default" || key === "__esModule") return;
|
|
42
|
-
if (key in exports && exports[key] === _rollup[key]) return;
|
|
43
|
-
Object.defineProperty(exports, key, {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
get: function () {
|
|
46
|
-
return _rollup[key];
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
var _stylelint = require("./stylelint/index.cjs");
|
|
51
|
-
Object.keys(_stylelint).forEach(function (key) {
|
|
52
|
-
if (key === "default" || key === "__esModule") return;
|
|
53
|
-
if (key in exports && exports[key] === _stylelint[key]) return;
|
|
54
|
-
Object.defineProperty(exports, key, {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function () {
|
|
57
|
-
return _stylelint[key];
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
var _template = require("./template/index.cjs");
|
|
62
|
-
Object.keys(_template).forEach(function (key) {
|
|
63
|
-
if (key === "default" || key === "__esModule") return;
|
|
64
|
-
if (key in exports && exports[key] === _template[key]) return;
|
|
65
|
-
Object.defineProperty(exports, key, {
|
|
66
|
-
enumerable: true,
|
|
67
|
-
get: function () {
|
|
68
|
-
return _template[key];
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
var _util = require("./util/index.cjs");
|
|
73
|
-
Object.keys(_util).forEach(function (key) {
|
|
74
|
-
if (key === "default" || key === "__esModule") return;
|
|
75
|
-
if (key in exports && exports[key] === _util[key]) return;
|
|
76
|
-
Object.defineProperty(exports, key, {
|
|
77
|
-
enumerable: true,
|
|
78
|
-
get: function () {
|
|
79
|
-
return _util[key];
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
var _vite = require("./vite/index.cjs");
|
|
84
|
-
Object.keys(_vite).forEach(function (key) {
|
|
85
|
-
if (key === "default" || key === "__esModule") return;
|
|
86
|
-
if (key in exports && exports[key] === _vite[key]) return;
|
|
87
|
-
Object.defineProperty(exports, key, {
|
|
88
|
-
enumerable: true,
|
|
89
|
-
get: function () {
|
|
90
|
-
return _vite[key];
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
});
|
package/dist/core/index.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "definePrettierConfig", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _prettierConfig.definePrettierConfig;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
var _prettierConfig = require("./prettier-config/prettier-config.cjs");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { definePrettierConfig } from './prettier-config/prettier-config';
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.definePrettierConfig = definePrettierConfig;
|
|
7
|
-
var _lodashEs = require("lodash-es");
|
|
8
|
-
function definePrettierConfig(config = {}) {
|
|
9
|
-
return (0, _lodashEs.merge)({
|
|
10
|
-
// 起始格式化间隔
|
|
11
|
-
tabWidth: 2,
|
|
12
|
-
// 使用单引号
|
|
13
|
-
singleQuote: true,
|
|
14
|
-
// jsx 中使用单引号
|
|
15
|
-
jsxSingleQuote: true,
|
|
16
|
-
// 对象中的 key 是否需要引号。as-needed: 只有在必须时才要
|
|
17
|
-
quoteProps: "as-needed",
|
|
18
|
-
// 每行结尾是否需要分号
|
|
19
|
-
trailingComma: "all",
|
|
20
|
-
// 括号中参数前后补充空格
|
|
21
|
-
bracketSpacing: true,
|
|
22
|
-
// 箭头函数,参数是否添加括号
|
|
23
|
-
arrowParens: "avoid",
|
|
24
|
-
// jsx 元素最后末尾的 > ,换行放置
|
|
25
|
-
bracketSameLine: false,
|
|
26
|
-
// 设置换行符
|
|
27
|
-
endOfLine: "lf"
|
|
28
|
-
}, config);
|
|
29
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Options } from 'prettier';
|
|
2
|
-
/**
|
|
3
|
-
* 基于基础配置,定义 prettier 配置
|
|
4
|
-
*
|
|
5
|
-
* @description 提交信息规范,提交格式: type: description
|
|
6
|
-
* feat: 新功能(feature)
|
|
7
|
-
* fix: 修补bug
|
|
8
|
-
* docs: 文档(documentation)
|
|
9
|
-
* style: 格式(不影响代码运行的变动)
|
|
10
|
-
* refactor: 重构(即不是新增功能,也不是修改bug的代码变动)
|
|
11
|
-
* test: 增加测试,或测试变更
|
|
12
|
-
* perf : 性能优化
|
|
13
|
-
* revert: 撤销上一次的提交
|
|
14
|
-
* build: 构建工具或构建过程等的变动,如:关联包升级等
|
|
15
|
-
* chore: 其他修改(不在上述类型中的修改)
|
|
16
|
-
* release: 发布新版本
|
|
17
|
-
*
|
|
18
|
-
* @export
|
|
19
|
-
* @param {Options} config
|
|
20
|
-
* @returns {*} {Options}
|
|
21
|
-
*/
|
|
22
|
-
export declare function definePrettierConfig(config?: Options): Options;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _exportNames = {
|
|
7
|
-
defineRollupConfig: true
|
|
8
|
-
};
|
|
9
|
-
Object.defineProperty(exports, "defineRollupConfig", {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
get: function () {
|
|
12
|
-
return _devConfig.defineRollupConfig;
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
var _devConfig = require("./rollup-config/dev-config.cjs");
|
|
16
|
-
var _rollupPlugins = require("./rollup-plugins/index.cjs");
|
|
17
|
-
Object.keys(_rollupPlugins).forEach(function (key) {
|
|
18
|
-
if (key === "default" || key === "__esModule") return;
|
|
19
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
20
|
-
if (key in exports && exports[key] === _rollupPlugins[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () {
|
|
24
|
-
return _rollupPlugins[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|