@gct-paas/build 0.1.5-dev.8 → 0.1.6-dev.1

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.
Files changed (49) hide show
  1. package/dist/constants/index.cjs +1 -1
  2. package/dist/eslint/eslint-config/eslint-config.cjs +1 -0
  3. package/dist/index.cjs +0 -11
  4. package/dist/index.d.ts +0 -1
  5. package/dist/vite/vite-config/vite-base-config.cjs +2 -25
  6. package/dist/vite/vite-config/vite-config.cjs +2 -18
  7. package/dist/vite/vite-config/vite-dev-config.cjs +1 -2
  8. package/dist/vite/vite-config/vite-pkg-dev-config.cjs +4 -7
  9. package/dist/vite/vite-config/vite-project-config.cjs +4 -43
  10. package/dist/vite/vite-config/vite-project-config.d.ts +1 -2
  11. package/es/constants/index.mjs +13 -3
  12. package/es/eslint/eslint-config/eslint-config.mjs +1 -0
  13. package/es/index.d.ts +0 -1
  14. package/es/index.mjs +0 -1
  15. package/es/vite/vite-config/vite-base-config.mjs +0 -24
  16. package/es/vite/vite-config/vite-config.mjs +2 -18
  17. package/es/vite/vite-config/vite-dev-config.mjs +1 -2
  18. package/es/vite/vite-config/vite-pkg-dev-config.mjs +2 -7
  19. package/es/vite/vite-config/vite-project-config.d.ts +1 -2
  20. package/es/vite/vite-config/vite-project-config.mjs +18 -48
  21. package/package.json +31 -47
  22. package/dist/rollup/index.cjs +0 -35
  23. package/dist/rollup/index.d.ts +0 -3
  24. package/dist/rollup/rollup-config/build-config.cjs +0 -60
  25. package/dist/rollup/rollup-config/build-config.d.ts +0 -9
  26. package/dist/rollup/rollup-config/dev-config.cjs +0 -107
  27. package/dist/rollup/rollup-config/dev-config.d.ts +0 -9
  28. package/dist/rollup/rollup-plugins/copy-file.cjs +0 -24
  29. package/dist/rollup/rollup-plugins/copy-file.d.ts +0 -37
  30. package/dist/rollup/rollup-plugins/ignore-compiler-file.cjs +0 -23
  31. package/dist/rollup/rollup-plugins/ignore-compiler-file.d.ts +0 -8
  32. package/dist/rollup/rollup-plugins/index.cjs +0 -19
  33. package/dist/rollup/rollup-plugins/index.d.ts +0 -2
  34. package/dist/vite/gct-opts.interface.cjs +0 -1
  35. package/dist/vite/gct-opts.interface.d.ts +0 -18
  36. package/es/rollup/index.d.ts +0 -3
  37. package/es/rollup/index.mjs +0 -3
  38. package/es/rollup/rollup-config/build-config.d.ts +0 -9
  39. package/es/rollup/rollup-config/build-config.mjs +0 -67
  40. package/es/rollup/rollup-config/dev-config.d.ts +0 -9
  41. package/es/rollup/rollup-config/dev-config.mjs +0 -124
  42. package/es/rollup/rollup-plugins/copy-file.d.ts +0 -37
  43. package/es/rollup/rollup-plugins/copy-file.mjs +0 -18
  44. package/es/rollup/rollup-plugins/ignore-compiler-file.d.ts +0 -8
  45. package/es/rollup/rollup-plugins/ignore-compiler-file.mjs +0 -17
  46. package/es/rollup/rollup-plugins/index.d.ts +0 -2
  47. package/es/rollup/rollup-plugins/index.mjs +0 -2
  48. package/es/vite/gct-opts.interface.d.ts +0 -18
  49. package/es/vite/gct-opts.interface.mjs +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gct-paas/build",
3
- "version": "0.1.5-dev.8",
3
+ "version": "0.1.6-dev.1",
4
4
  "type": "module",
5
5
  "description": "paas 平台核心包",
6
6
  "main": "dist/index.cjs",
@@ -39,75 +39,59 @@
39
39
  "publish:npm": "npm run build && npm publish --access public --registry=https://registry.npmjs.org/"
40
40
  },
41
41
  "dependencies": {
42
- "@babel/core": "^7.28.6",
43
- "@babel/preset-env": "^7.28.6",
44
- "@commitlint/cli": "^20.3.1",
45
- "@commitlint/config-conventional": "^20.3.1",
46
- "@eslint/config-helpers": "^0.5.1",
47
- "@eslint/js": "^9.39.2",
48
- "@gct-paas/scss": "^0.1.4-dev.7",
49
- "@inquirer/prompts": "^8.2.0",
50
- "@rollup/plugin-babel": "^6.1.0",
51
- "@rollup/plugin-commonjs": "^29.0.0",
52
- "@rollup/plugin-eslint": "^9.2.0",
53
- "@rollup/plugin-json": "^6.1.0",
54
- "@rollup/plugin-node-resolve": "^16.0.3",
55
- "@rollup/plugin-typescript": "^12.3.0",
56
- "@vitejs/plugin-legacy": "^7.2.1",
57
- "@vitejs/plugin-vue": "^6.0.3",
58
- "@vitejs/plugin-vue-jsx": "^5.1.3",
59
- "@vue/compiler-sfc": "^3.5.27",
42
+ "@commitlint/cli": "^20.4.4",
43
+ "@commitlint/config-conventional": "^20.4.4",
44
+ "@eslint/config-helpers": "^0.5.3",
45
+ "@eslint/js": "^10.0.1",
46
+ "@gct-paas/scss": "^0.1.5",
47
+ "@inquirer/prompts": "^8.3.0",
48
+ "@vitejs/plugin-vue": "^6.0.5",
49
+ "@vitejs/plugin-vue-jsx": "^5.1.5",
50
+ "@vue/compiler-sfc": "^3.5.30",
60
51
  "chokidar": "^5.0.0",
61
- "commander": "^14.0.2",
52
+ "commander": "^14.0.3",
62
53
  "consola": "^3.4.2",
63
54
  "copy-file": "^11.1.0",
64
55
  "core-js": "^3.48.0",
65
- "cpy": "^12.1.0",
66
56
  "crypto": "^1.0.1",
67
- "cssnano": "^7.1.2",
68
- "esbuild": "^0.27.2",
69
- "eslint": "^9.39.2",
57
+ "cssnano": "^7.1.3",
58
+ "eslint": "^9.39.4",
70
59
  "eslint-config-prettier": "^10.1.8",
71
60
  "eslint-plugin-import": "^2.32.0",
72
61
  "eslint-plugin-prettier": "^5.5.5",
73
- "eslint-plugin-unused-imports": "^4.3.0",
74
- "eslint-plugin-vue": "^10.7.0",
62
+ "eslint-plugin-unused-imports": "^4.4.1",
63
+ "eslint-plugin-vue": "^10.8.0",
75
64
  "fast-glob": "^3.3.3",
76
- "fs-extra": "^11.3.3",
77
- "globals": "^17.1.0",
65
+ "fs-extra": "^11.3.4",
66
+ "globals": "^17.4.0",
78
67
  "lodash-es": "^4.17.23",
79
- "ora": "^9.1.0",
68
+ "ora": "^9.3.0",
80
69
  "picocolors": "^1.1.1",
81
70
  "prettier": "^3.8.1",
82
- "rimraf": "^6.1.2",
83
- "rollup": "^4.56.0",
84
- "rollup-plugin-esbuild": "^6.2.1",
85
- "rollup-plugin-postcss": "^4.0.2",
86
- "sass": "^1.97.3",
87
- "simple-git": "^3.30.0",
88
- "stylelint": "^17.0.0",
71
+ "rimraf": "^6.1.3",
72
+ "sass": "^1.98.0",
73
+ "stylelint": "^17.4.0",
89
74
  "stylelint-config-standard-scss": "^17.0.0",
90
- "typescript-eslint": "^8.53.1",
91
- "unocss": "66.6.2",
92
- "vite": "^7.3.1",
75
+ "typescript-eslint": "^8.57.0",
76
+ "unocss": "66.6.6",
77
+ "vite": "^8.0.0",
93
78
  "vite-plugin-dts": "^4.5.4",
94
79
  "vite-plugin-lib-inject-css": "^2.2.2",
95
- "vite-plugin-static-copy": "^3.2.0",
96
- "vite-tsconfig-paths": "^6.0.5",
97
- "vue-eslint-parser": "^10.2.0",
98
- "vue-tsc": "^3.2.4"
80
+ "vite-plugin-static-copy": "^3.3.0",
81
+ "vue-eslint-parser": "^10.4.0",
82
+ "vue-tsc": "^3.2.5"
99
83
  },
100
84
  "devDependencies": {
101
- "@commitlint/types": "^20.3.1",
85
+ "@commitlint/types": "^20.4.4",
102
86
  "@types/babel__core": "^7.20.5",
103
87
  "@types/babel__preset-env": "^7.10.0",
104
88
  "@types/fs-extra": "^11.0.4",
105
89
  "@types/lodash-es": "^4.17.12",
106
- "@types/node": "^25.0.10",
107
- "postcss": "^8.5.6",
90
+ "@types/node": "^25.5.0",
91
+ "postcss": "^8.5.8",
108
92
  "tsx": "^4.21.0",
109
93
  "typescript": "^5.9.3",
110
94
  "unbuild": "^3.6.1"
111
95
  },
112
- "gitHead": "72538ef9e35d776e677136b0253a0e132758eaf8"
96
+ "gitHead": "ac6a576b84157817fa6d5159bb0725ba189aa11e"
113
97
  }
@@ -1,35 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _exportNames = {
7
- defineRollupBuildConfig: true,
8
- defineRollupConfig: true
9
- };
10
- Object.defineProperty(exports, "defineRollupBuildConfig", {
11
- enumerable: true,
12
- get: function () {
13
- return _buildConfig.defineRollupBuildConfig;
14
- }
15
- });
16
- Object.defineProperty(exports, "defineRollupConfig", {
17
- enumerable: true,
18
- get: function () {
19
- return _devConfig.defineRollupConfig;
20
- }
21
- });
22
- var _buildConfig = require("./rollup-config/build-config.cjs");
23
- var _devConfig = require("./rollup-config/dev-config.cjs");
24
- var _rollupPlugins = require("./rollup-plugins/index.cjs");
25
- Object.keys(_rollupPlugins).forEach(function (key) {
26
- if (key === "default" || key === "__esModule") return;
27
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
28
- if (key in exports && exports[key] === _rollupPlugins[key]) return;
29
- Object.defineProperty(exports, key, {
30
- enumerable: true,
31
- get: function () {
32
- return _rollupPlugins[key];
33
- }
34
- });
35
- });
@@ -1,3 +0,0 @@
1
- export { defineRollupBuildConfig } from './rollup-config/build-config';
2
- export { defineRollupConfig } from './rollup-config/dev-config';
3
- export * from './rollup-plugins';
@@ -1,60 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.defineRollupBuildConfig = defineRollupBuildConfig;
7
- var _rollup = require("rollup");
8
- var _path = _interopRequireDefault(require("path"));
9
- var _pluginNodeResolve = require("@rollup/plugin-node-resolve");
10
- var _pluginCommonjs = _interopRequireDefault(require("@rollup/plugin-commonjs"));
11
- var _pluginJson = _interopRequireDefault(require("@rollup/plugin-json"));
12
- var _rollupPluginEsbuild = _interopRequireWildcard(require("rollup-plugin-esbuild"));
13
- var _pluginVue = _interopRequireDefault(require("@vitejs/plugin-vue"));
14
- var _pluginVueJsx = _interopRequireDefault(require("@vitejs/plugin-vue-jsx"));
15
- var rf = _interopRequireWildcard(require("rimraf"));
16
- var _rollupPlugins = require("../rollup-plugins/index.cjs");
17
- var _constants = require("../../constants/index.cjs");
18
- var _util = require("../../util/index.cjs");
19
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
20
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
21
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
22
- function defineRollupBuildConfig(opts = {}) {
23
- process.on("SIGINT", () => {
24
- process.exit();
25
- });
26
- const cwd = process.cwd();
27
- const isProd = process.env.NODE_ENV === _constants.PROD_MODE;
28
- const outDir = _path.default.resolve(cwd, "es");
29
- const externalCompileFileReg = /\.(d\.ts)+$/;
30
- rf.sync(outDir);
31
- const output = [{
32
- file: "dist/index.esm.min.js",
33
- format: "es"
34
- }, {
35
- file: "dist/index.system.min.js",
36
- format: "system"
37
- }, {
38
- file: "dist/index.cjs.min.js",
39
- format: "cjs",
40
- exports: "named"
41
- }];
42
- return (0, _util.mergeConfig)((0, _rollup.defineConfig)({
43
- input: "src/index.ts",
44
- treeshake: false,
45
- external: _constants.DEFAULT_EXTERNAL,
46
- output,
47
- plugins: [(0, _rollupPlugins.ignoreCompilerFile)(externalCompileFileReg), (0, _pluginJson.default)(), (0, _pluginVue.default)({
48
- isProduction: isProd
49
- }), (0, _pluginVueJsx.default)({}), (0, _pluginNodeResolve.nodeResolve)({
50
- extensions: [".cjs", ".mjs", ".js", ".ts"]
51
- }), (0, _pluginCommonjs.default)(), (0, _rollupPluginEsbuild.default)({
52
- logLevel: "verbose",
53
- sourceMap: false,
54
- target: ["esnext"],
55
- loaders: {
56
- ".vue": "ts"
57
- }
58
- }), (0, _rollupPluginEsbuild.minify)()]
59
- }), opts);
60
- }
@@ -1,9 +0,0 @@
1
- import { RollupOptions } from 'rollup';
2
- /**
3
- * 开发包基础编译配置
4
- *
5
- * @export
6
- * @param {RollupOptions} [opts={}]
7
- * @returns {*} {RollupOptions}
8
- */
9
- export declare function defineRollupBuildConfig(opts?: RollupOptions): RollupOptions;
@@ -1,107 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.defineRollupConfig = defineRollupConfig;
7
- var _rollup = require("rollup");
8
- var _path = _interopRequireDefault(require("path"));
9
- var _pluginNodeResolve = require("@rollup/plugin-node-resolve");
10
- var _pluginCommonjs = _interopRequireDefault(require("@rollup/plugin-commonjs"));
11
- var _pluginJson = _interopRequireDefault(require("@rollup/plugin-json"));
12
- var _rollupPluginEsbuild = _interopRequireDefault(require("rollup-plugin-esbuild"));
13
- var _vitePluginDts = _interopRequireDefault(require("vite-plugin-dts"));
14
- var _pluginVue = _interopRequireDefault(require("@vitejs/plugin-vue"));
15
- var _pluginVueJsx = _interopRequireDefault(require("@vitejs/plugin-vue-jsx"));
16
- var rf = _interopRequireWildcard(require("rimraf"));
17
- var _cpy = _interopRequireDefault(require("cpy"));
18
- var _fsExtra = _interopRequireDefault(require("fs-extra"));
19
- var _os = _interopRequireDefault(require("os"));
20
- var _rollupPlugins = require("../rollup-plugins/index.cjs");
21
- var _constants = require("../../constants/index.cjs");
22
- var _util = require("../../util/index.cjs");
23
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
24
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
25
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
26
- function defineRollupConfig(opts = {}) {
27
- process.on("SIGINT", () => {
28
- process.exit();
29
- });
30
- const cwd = process.cwd();
31
- const isProd = process.env.NODE_ENV === _constants.PROD_MODE;
32
- const rootDir = _path.default.resolve(cwd, "src");
33
- const outDir = _path.default.resolve(cwd, "es");
34
- const assetsDir = _path.default.resolve(cwd, "public");
35
- const externalCompileFileReg = /\.(scss|css|less|d\.ts)+$/;
36
- rf.sync(outDir);
37
- if (isProd) {
38
- const isWin = _os.default.platform() === "win32";
39
- if (isWin) {
40
- if (_fsExtra.default.pathExistsSync(assetsDir)) {
41
- (0, _cpy.default)((0, _util.winToUnixPath)(assetsDir), (0, _util.winToUnixPath)(outDir));
42
- }
43
- (0, _cpy.default)((0, _util.winToUnixPath)(_path.default.resolve(cwd, "src/**/*.{scss,css,less,d.ts}")), (0, _util.winToUnixPath)(outDir));
44
- } else {
45
- if (_fsExtra.default.pathExistsSync(assetsDir)) {
46
- (0, _cpy.default)(assetsDir, outDir);
47
- }
48
- (0, _cpy.default)(_path.default.resolve(cwd, "src/**/*.{scss,css,less,d.ts}"), outDir);
49
- }
50
- } else {
51
- (0, _rollupPlugins.copyFile)([{
52
- from: assetsDir,
53
- to: outDir
54
- }, {
55
- from: rootDir,
56
- to: outDir,
57
- opts: {
58
- ignored: (file, stats) => {
59
- if (stats && stats.isFile()) {
60
- return !externalCompileFileReg.test(file);
61
- }
62
- return false;
63
- }
64
- }
65
- }]);
66
- }
67
- const output = [{
68
- dir: outDir,
69
- esModule: true,
70
- format: "es",
71
- sourcemap: false,
72
- preserveModules: true,
73
- preserveModulesRoot: rootDir,
74
- exports: "named",
75
- entryFileNames: "[name].mjs"
76
- }];
77
- return (0, _util.mergeConfig)((0, _rollup.defineConfig)({
78
- input: "src/index.ts",
79
- treeshake: false,
80
- external: id => {
81
- if (_util.IS_NODE_MODULE.test(id)) {
82
- return true;
83
- }
84
- if (_constants.DEFAULT_EXTERNAL.includes(id)) {
85
- return true;
86
- }
87
- return false;
88
- },
89
- output,
90
- plugins: [(0, _rollupPlugins.ignoreCompilerFile)(externalCompileFileReg), (0, _pluginJson.default)(), (0, _pluginVue.default)({
91
- isProduction: isProd
92
- }), (0, _pluginVueJsx.default)({}), (0, _pluginNodeResolve.nodeResolve)({
93
- extensions: [".cjs", ".mjs", ".js", ".ts"]
94
- }), (0, _pluginCommonjs.default)(), (0, _rollupPluginEsbuild.default)({
95
- logLevel: "verbose",
96
- sourceMap: false,
97
- target: ["esnext"],
98
- loaders: {
99
- ".vue": "ts"
100
- }
101
- }), (0, _vitePluginDts.default)({
102
- outDir: [outDir],
103
- // 排除测试目录,以及测试文件
104
- exclude: ["**/test/**", "**/*.test.ts", "**/*.test.tsx", "**/*.spec.ts", "**/*.spec.tsx"]
105
- })]
106
- }), opts);
107
- }
@@ -1,9 +0,0 @@
1
- import { RollupOptions } from 'rollup';
2
- /**
3
- * 开发包基础编译配置
4
- *
5
- * @export
6
- * @param {RollupOptions} [opts={}]
7
- * @returns {*} {RollupOptions}
8
- */
9
- export declare function defineRollupConfig(opts?: RollupOptions): RollupOptions;
@@ -1,24 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.copyFile = copyFile;
7
- var _util = require("../../util/index.cjs");
8
- function copyFile(opts) {
9
- if (opts.length === 0) {
10
- return;
11
- }
12
- const arr = [];
13
- opts.forEach(opt => {
14
- arr.push(new _util.CopyWatch(opt.from, opt.to, opt.opts));
15
- });
16
- process.on("exit", () => {
17
- if (!opts.length) {
18
- return;
19
- }
20
- arr.forEach(item => {
21
- item.unwatch();
22
- });
23
- });
24
- }
@@ -1,37 +0,0 @@
1
- import * as chokidar from 'chokidar';
2
- /**
3
- * 文件拷贝插件配置参数
4
- *
5
- * @export
6
- * @interface CopyFilePluginOptions
7
- */
8
- export interface CopyFilePluginOptions {
9
- /**
10
- * 源文件
11
- *
12
- * @type {string}
13
- * @memberof CopyFilePluginOptions
14
- */
15
- from: string;
16
- /**
17
- * 目标文件
18
- *
19
- * @type {string}
20
- * @memberof CopyFilePluginOptions
21
- */
22
- to: string;
23
- /**
24
- * chokidar watch 配置
25
- *
26
- * @type {chokidar.ChokidarOptions}
27
- */
28
- opts?: chokidar.ChokidarOptions;
29
- }
30
- /**
31
- * 文件拷贝插件,在开发模式下会监控文件变更,并自动拷贝文件
32
- *
33
- * @export
34
- * @param {CopyFilePluginOptions[]} opts
35
- * @return {*} {Plugin}
36
- */
37
- export declare function copyFile(opts: CopyFilePluginOptions[]): void;
@@ -1,23 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.ignoreCompilerFile = ignoreCompilerFile;
7
- function ignoreCompilerFile(extReg) {
8
- return {
9
- name: "gct:ignore-compiler-file",
10
- resolveId(source) {
11
- if (extReg.test(source)) {
12
- return {
13
- id: source,
14
- external: true
15
- };
16
- }
17
- return null;
18
- },
19
- load() {
20
- return null;
21
- }
22
- };
23
- }
@@ -1,8 +0,0 @@
1
- import { Plugin } from 'rollup';
2
- /**
3
- * 忽略编译的文件类型
4
- *
5
- * @export
6
- * @returns {*} {Plugin}
7
- */
8
- export declare function ignoreCompilerFile(extReg: RegExp): Plugin;
@@ -1,19 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "copyFile", {
7
- enumerable: true,
8
- get: function () {
9
- return _copyFile.copyFile;
10
- }
11
- });
12
- Object.defineProperty(exports, "ignoreCompilerFile", {
13
- enumerable: true,
14
- get: function () {
15
- return _ignoreCompilerFile.ignoreCompilerFile;
16
- }
17
- });
18
- var _copyFile = require("./copy-file.cjs");
19
- var _ignoreCompilerFile = require("./ignore-compiler-file.cjs");
@@ -1,2 +0,0 @@
1
- export { copyFile } from './copy-file';
2
- export { ignoreCompilerFile } from './ignore-compiler-file';
@@ -1 +0,0 @@
1
- "use strict";
@@ -1,18 +0,0 @@
1
- /**
2
- * 项目自定义配置接口
3
- *
4
- * @author chitanda
5
- * @date 2025-08-24 11:08:43
6
- * @export
7
- * @interface GctOpts
8
- */
9
- export interface GctOpts {
10
- /**
11
- * HTTP 代理配置,根据分支前缀匹配
12
- *
13
- * @author chitanda
14
- * @date 2025-08-24 11:08:56
15
- * @type {Record<string, string>}
16
- */
17
- httpProxyConfig: Record<string, string>;
18
- }
@@ -1,3 +0,0 @@
1
- export { defineRollupBuildConfig } from './rollup-config/build-config';
2
- export { defineRollupConfig } from './rollup-config/dev-config';
3
- export * from './rollup-plugins';
@@ -1,3 +0,0 @@
1
- export { defineRollupBuildConfig } from "./rollup-config/build-config.mjs";
2
- export { defineRollupConfig } from "./rollup-config/dev-config.mjs";
3
- export * from "./rollup-plugins/index.mjs";
@@ -1,9 +0,0 @@
1
- import { RollupOptions } from 'rollup';
2
- /**
3
- * 开发包基础编译配置
4
- *
5
- * @export
6
- * @param {RollupOptions} [opts={}]
7
- * @returns {*} {RollupOptions}
8
- */
9
- export declare function defineRollupBuildConfig(opts?: RollupOptions): RollupOptions;
@@ -1,67 +0,0 @@
1
- import { defineConfig } from "rollup";
2
- import path from "path";
3
- import { nodeResolve } from "@rollup/plugin-node-resolve";
4
- import commonjs from "@rollup/plugin-commonjs";
5
- import json from "@rollup/plugin-json";
6
- import esbuild, { minify } from "rollup-plugin-esbuild";
7
- import vue from "@vitejs/plugin-vue";
8
- import vueJsx from "@vitejs/plugin-vue-jsx";
9
- import * as rf from "rimraf";
10
- import { ignoreCompilerFile } from "../rollup-plugins/index.mjs";
11
- import { DEFAULT_EXTERNAL, PROD_MODE } from "../../constants/index.mjs";
12
- import { mergeConfig } from "../../util/index.mjs";
13
- export function defineRollupBuildConfig(opts = {}) {
14
- process.on("SIGINT", () => {
15
- process.exit();
16
- });
17
- const cwd = process.cwd();
18
- const isProd = process.env.NODE_ENV === PROD_MODE;
19
- const outDir = path.resolve(cwd, "es");
20
- const externalCompileFileReg = /\.(d\.ts)+$/;
21
- rf.sync(outDir);
22
- const output = [
23
- {
24
- file: "dist/index.esm.min.js",
25
- format: "es"
26
- },
27
- {
28
- file: "dist/index.system.min.js",
29
- format: "system"
30
- },
31
- {
32
- file: "dist/index.cjs.min.js",
33
- format: "cjs",
34
- exports: "named"
35
- }
36
- ];
37
- return mergeConfig(
38
- defineConfig({
39
- input: "src/index.ts",
40
- treeshake: false,
41
- external: DEFAULT_EXTERNAL,
42
- output,
43
- plugins: [
44
- ignoreCompilerFile(externalCompileFileReg),
45
- json(),
46
- vue({
47
- isProduction: isProd
48
- }),
49
- vueJsx({}),
50
- nodeResolve({
51
- extensions: [".cjs", ".mjs", ".js", ".ts"]
52
- }),
53
- commonjs(),
54
- esbuild({
55
- logLevel: "verbose",
56
- sourceMap: false,
57
- target: ["esnext"],
58
- loaders: {
59
- ".vue": "ts"
60
- }
61
- }),
62
- minify()
63
- ]
64
- }),
65
- opts
66
- );
67
- }
@@ -1,9 +0,0 @@
1
- import { RollupOptions } from 'rollup';
2
- /**
3
- * 开发包基础编译配置
4
- *
5
- * @export
6
- * @param {RollupOptions} [opts={}]
7
- * @returns {*} {RollupOptions}
8
- */
9
- export declare function defineRollupConfig(opts?: RollupOptions): RollupOptions;