@gct-paas/build 0.1.5-dev.6 → 0.1.5-dev.8
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/eslint/eslint-config/eslint-config.cjs +1 -0
- package/dist/index.cjs +11 -0
- package/dist/index.d.ts +1 -0
- package/dist/unocss/index.cjs +16 -0
- package/dist/unocss/index.d.ts +1 -0
- package/dist/unocss/unocss.config.cjs +32 -0
- package/dist/unocss/unocss.config.d.ts +9 -0
- package/dist/vite/vite-config/vite-base-config.cjs +4 -1
- package/dist/vite/vite-config/vite-pkg-dev-config.cjs +4 -1
- package/dist/vite/vite-config/vite-project-config.cjs +4 -1
- package/es/eslint/eslint-config/eslint-config.mjs +1 -0
- package/es/index.d.ts +1 -0
- package/es/index.mjs +1 -0
- package/es/unocss/index.d.ts +1 -0
- package/es/unocss/index.mjs +1 -0
- package/es/unocss/unocss.config.d.ts +9 -0
- package/es/unocss/unocss.config.mjs +36 -0
- package/es/vite/vite-config/vite-base-config.mjs +3 -1
- package/es/vite/vite-config/vite-pkg-dev-config.mjs +2 -0
- package/es/vite/vite-config/vite-project-config.mjs +2 -0
- package/package.json +3 -2
|
@@ -76,6 +76,7 @@ function defineEslintConfig(...configs) {
|
|
|
76
76
|
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
77
77
|
"@typescript-eslint/no-non-null-assertion": "off",
|
|
78
78
|
"@typescript-eslint/no-extraneous-class": "off",
|
|
79
|
+
"@typescript-eslint/no-dynamic-delete": "off",
|
|
79
80
|
// 其他规则覆盖
|
|
80
81
|
"class-methods-use-this": "off",
|
|
81
82
|
"prefer-destructuring": "off"
|
package/dist/index.cjs
CHANGED
|
@@ -58,6 +58,17 @@ Object.keys(_stylelint).forEach(function (key) {
|
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
60
|
});
|
|
61
|
+
var _unocss = require("./unocss/index.cjs");
|
|
62
|
+
Object.keys(_unocss).forEach(function (key) {
|
|
63
|
+
if (key === "default" || key === "__esModule") return;
|
|
64
|
+
if (key in exports && exports[key] === _unocss[key]) return;
|
|
65
|
+
Object.defineProperty(exports, key, {
|
|
66
|
+
enumerable: true,
|
|
67
|
+
get: function () {
|
|
68
|
+
return _unocss[key];
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
});
|
|
61
72
|
var _util = require("./util/index.cjs");
|
|
62
73
|
Object.keys(_util).forEach(function (key) {
|
|
63
74
|
if (key === "default" || key === "__esModule") return;
|
package/dist/index.d.ts
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _unocss = require("./unocss.config.cjs");
|
|
7
|
+
Object.keys(_unocss).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _unocss[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _unocss[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './unocss.config';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.defineUnoConfig = defineUnoConfig;
|
|
7
|
+
var _unocss = require("unocss");
|
|
8
|
+
var _util = require("../util/index.cjs");
|
|
9
|
+
function defineUnoConfig(config) {
|
|
10
|
+
return (0, _unocss.defineConfig)((0, _util.mergeConfig)({
|
|
11
|
+
shortcuts: {
|
|
12
|
+
"ks-row": "flex",
|
|
13
|
+
"ks-column": "flex flex-col",
|
|
14
|
+
"ks-col": "flex-1",
|
|
15
|
+
"ks-row-middle": "flex items-center",
|
|
16
|
+
"ks-row-start": "flex items-start",
|
|
17
|
+
"ks-row-end": "flex items-end",
|
|
18
|
+
"ks-row-center": "flex justify-center",
|
|
19
|
+
"ks-row-left": "flex justify-start",
|
|
20
|
+
"ks-row-right": "flex justify-end",
|
|
21
|
+
"ks-row-center-middle": "flex items-center justify-center",
|
|
22
|
+
"ks-row-center-between": "flex items-center justify-between",
|
|
23
|
+
"ks-row-center-around": "flex items-center justify-around",
|
|
24
|
+
"ks-row-between": "flex justify-between",
|
|
25
|
+
ell: "text-ellipsis whitespace-nowrap overflow-hidden",
|
|
26
|
+
"gct-color-text-1": "text-[#1A1D23]",
|
|
27
|
+
"gct-color-text-4": "text-[#5A5F6B]",
|
|
28
|
+
"gct-color-text-5": "text-[#8B8B8B]"
|
|
29
|
+
},
|
|
30
|
+
presets: [(0, _unocss.presetUno)(), (0, _unocss.presetTypography)(), (0, _unocss.presetWebFonts)({})]
|
|
31
|
+
}, config));
|
|
32
|
+
}
|
|
@@ -8,6 +8,7 @@ var _vite = require("vite");
|
|
|
8
8
|
var _pluginVue = _interopRequireDefault(require("@vitejs/plugin-vue"));
|
|
9
9
|
var _pluginVueJsx = _interopRequireDefault(require("@vitejs/plugin-vue-jsx"));
|
|
10
10
|
var _pluginJson = _interopRequireDefault(require("@rollup/plugin-json"));
|
|
11
|
+
var _vite2 = _interopRequireDefault(require("unocss/vite"));
|
|
11
12
|
var _viteTsconfigPaths = _interopRequireDefault(require("vite-tsconfig-paths"));
|
|
12
13
|
var _path = _interopRequireDefault(require("path"));
|
|
13
14
|
var _constants = require("../../constants/index.cjs");
|
|
@@ -30,7 +31,9 @@ function defineViteBaseConfig(opts = {}) {
|
|
|
30
31
|
external: _constants.DEFAULT_EXTERNAL
|
|
31
32
|
}
|
|
32
33
|
},
|
|
33
|
-
plugins: [(0, _viteTsconfigPaths.default)(), (0, _pluginJson.default)(), (0, _pluginVue.default)(), (0, _pluginVueJsx.default)()
|
|
34
|
+
plugins: [(0, _viteTsconfigPaths.default)(), (0, _pluginJson.default)(), (0, _pluginVue.default)(), (0, _pluginVueJsx.default)(), (0, _vite2.default)({
|
|
35
|
+
hmrTopLevelAwait: false
|
|
36
|
+
})
|
|
34
37
|
// 关系 babel 配置,这个配置要放在具体的 project vite 编译配置中,底包应该是干净的
|
|
35
38
|
// babel({
|
|
36
39
|
// babelHelpers: 'bundled',
|
|
@@ -15,6 +15,7 @@ var _viteTsconfigPaths = _interopRequireDefault(require("vite-tsconfig-paths"));
|
|
|
15
15
|
var _vitePluginStaticCopy = require("vite-plugin-static-copy");
|
|
16
16
|
var _vitePluginDts = _interopRequireDefault(require("vite-plugin-dts"));
|
|
17
17
|
var _fs = require("fs");
|
|
18
|
+
var _vite2 = _interopRequireDefault(require("unocss/vite"));
|
|
18
19
|
var _util = require("../../util/index.cjs");
|
|
19
20
|
var _constants = require("../../constants/index.cjs");
|
|
20
21
|
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); }
|
|
@@ -73,7 +74,9 @@ function definePkgDevViteConfig(opts = {}) {
|
|
|
73
74
|
formats: ["es"]
|
|
74
75
|
}
|
|
75
76
|
},
|
|
76
|
-
plugins: [(0, _viteTsconfigPaths.default)(), (0, _pluginJson.default)(), (0, _pluginVue.default)(), (0, _pluginVueJsx.default)(), (0,
|
|
77
|
+
plugins: [(0, _viteTsconfigPaths.default)(), (0, _pluginJson.default)(), (0, _pluginVue.default)(), (0, _pluginVueJsx.default)(), (0, _vite2.default)({
|
|
78
|
+
hmrTopLevelAwait: false
|
|
79
|
+
}), (0, _vitePluginLibInjectCss.libInjectCss)(), (0, _vitePluginDts.default)({
|
|
77
80
|
outDir: [outDir],
|
|
78
81
|
compilerOptions: {
|
|
79
82
|
declarationMap: isDev
|
|
@@ -9,6 +9,7 @@ var _pluginVue = _interopRequireDefault(require("@vitejs/plugin-vue"));
|
|
|
9
9
|
var _pluginVueJsx = _interopRequireDefault(require("@vitejs/plugin-vue-jsx"));
|
|
10
10
|
var _pluginLegacy = _interopRequireDefault(require("@vitejs/plugin-legacy"));
|
|
11
11
|
var _pluginJson = _interopRequireDefault(require("@rollup/plugin-json"));
|
|
12
|
+
var _vite2 = _interopRequireDefault(require("unocss/vite"));
|
|
12
13
|
var _path = _interopRequireDefault(require("path"));
|
|
13
14
|
var _fsExtra = _interopRequireDefault(require("fs-extra"));
|
|
14
15
|
var _simpleGit = require("simple-git");
|
|
@@ -85,7 +86,9 @@ function defineProjectViteConfig(gctOpts = {}, opts = {}) {
|
|
|
85
86
|
version: pkg.version
|
|
86
87
|
}
|
|
87
88
|
},
|
|
88
|
-
plugins: [(0, _pluginJson.default)(), (0, _pluginVue.default)(), (0, _pluginVueJsx.default)(), (0,
|
|
89
|
+
plugins: [(0, _pluginJson.default)(), (0, _pluginVue.default)(), (0, _pluginVueJsx.default)(), (0, _vite2.default)({
|
|
90
|
+
hmrTopLevelAwait: false
|
|
91
|
+
}), (0, _pluginLegacy.default)({
|
|
89
92
|
targets: ["chrome>=85", "edge>=85", "firefox>=79", "safari>=14.1"],
|
|
90
93
|
externalSystemJS: true,
|
|
91
94
|
// 关键配置:false 时只生成 legacy 版本
|
|
@@ -94,6 +94,7 @@ export function defineEslintConfig(...configs) {
|
|
|
94
94
|
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
95
95
|
"@typescript-eslint/no-non-null-assertion": "off",
|
|
96
96
|
"@typescript-eslint/no-extraneous-class": "off",
|
|
97
|
+
"@typescript-eslint/no-dynamic-delete": "off",
|
|
97
98
|
// 其他规则覆盖
|
|
98
99
|
"class-methods-use-this": "off",
|
|
99
100
|
"prefer-destructuring": "off"
|
package/es/index.d.ts
CHANGED
package/es/index.mjs
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './unocss.config';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./unocss.config.mjs";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import {
|
|
2
|
+
defineConfig,
|
|
3
|
+
presetTypography,
|
|
4
|
+
presetUno,
|
|
5
|
+
presetWebFonts
|
|
6
|
+
} from "unocss";
|
|
7
|
+
import { mergeConfig } from "../util/index.mjs";
|
|
8
|
+
export function defineUnoConfig(config) {
|
|
9
|
+
return defineConfig(
|
|
10
|
+
mergeConfig(
|
|
11
|
+
{
|
|
12
|
+
shortcuts: {
|
|
13
|
+
"ks-row": "flex",
|
|
14
|
+
"ks-column": "flex flex-col",
|
|
15
|
+
"ks-col": "flex-1",
|
|
16
|
+
"ks-row-middle": "flex items-center",
|
|
17
|
+
"ks-row-start": "flex items-start",
|
|
18
|
+
"ks-row-end": "flex items-end",
|
|
19
|
+
"ks-row-center": "flex justify-center",
|
|
20
|
+
"ks-row-left": "flex justify-start",
|
|
21
|
+
"ks-row-right": "flex justify-end",
|
|
22
|
+
"ks-row-center-middle": "flex items-center justify-center",
|
|
23
|
+
"ks-row-center-between": "flex items-center justify-between",
|
|
24
|
+
"ks-row-center-around": "flex items-center justify-around",
|
|
25
|
+
"ks-row-between": "flex justify-between",
|
|
26
|
+
ell: "text-ellipsis whitespace-nowrap overflow-hidden",
|
|
27
|
+
"gct-color-text-1": "text-[#1A1D23]",
|
|
28
|
+
"gct-color-text-4": "text-[#5A5F6B]",
|
|
29
|
+
"gct-color-text-5": "text-[#8B8B8B]"
|
|
30
|
+
},
|
|
31
|
+
presets: [presetUno(), presetTypography(), presetWebFonts({})]
|
|
32
|
+
},
|
|
33
|
+
config
|
|
34
|
+
)
|
|
35
|
+
);
|
|
36
|
+
}
|
|
@@ -2,6 +2,7 @@ import { defineConfig } from "vite";
|
|
|
2
2
|
import vue from "@vitejs/plugin-vue";
|
|
3
3
|
import vueJsx from "@vitejs/plugin-vue-jsx";
|
|
4
4
|
import json from "@rollup/plugin-json";
|
|
5
|
+
import UnoCSS from "unocss/vite";
|
|
5
6
|
import tsconfigPaths from "vite-tsconfig-paths";
|
|
6
7
|
import path from "path";
|
|
7
8
|
import { DEFAULT_EXTERNAL } from "../../constants/index.mjs";
|
|
@@ -28,7 +29,8 @@ export function defineViteBaseConfig(opts = {}) {
|
|
|
28
29
|
tsconfigPaths(),
|
|
29
30
|
json(),
|
|
30
31
|
vue(),
|
|
31
|
-
vueJsx()
|
|
32
|
+
vueJsx(),
|
|
33
|
+
UnoCSS({ hmrTopLevelAwait: false })
|
|
32
34
|
// 关系 babel 配置,这个配置要放在具体的 project vite 编译配置中,底包应该是干净的
|
|
33
35
|
// babel({
|
|
34
36
|
// babelHelpers: 'bundled',
|
|
@@ -9,6 +9,7 @@ import tsconfigPaths from "vite-tsconfig-paths";
|
|
|
9
9
|
import { viteStaticCopy } from "vite-plugin-static-copy";
|
|
10
10
|
import dts from "vite-plugin-dts";
|
|
11
11
|
import { readFileSync } from "fs";
|
|
12
|
+
import UnoCSS from "unocss/vite";
|
|
12
13
|
import { mergeConfig, IS_NODE_MODULE } from "../../util/index.mjs";
|
|
13
14
|
import { DEFAULT_EXTERNAL } from "../../constants/index.mjs";
|
|
14
15
|
export function definePkgDevViteConfig(opts = {}) {
|
|
@@ -70,6 +71,7 @@ export function definePkgDevViteConfig(opts = {}) {
|
|
|
70
71
|
json(),
|
|
71
72
|
vue(),
|
|
72
73
|
vueJsx(),
|
|
74
|
+
UnoCSS({ hmrTopLevelAwait: false }),
|
|
73
75
|
libInjectCss(),
|
|
74
76
|
dts({
|
|
75
77
|
outDir: [outDir],
|
|
@@ -5,6 +5,7 @@ import vue from "@vitejs/plugin-vue";
|
|
|
5
5
|
import vueJsx from "@vitejs/plugin-vue-jsx";
|
|
6
6
|
import legacy from "@vitejs/plugin-legacy";
|
|
7
7
|
import json from "@rollup/plugin-json";
|
|
8
|
+
import UnoCSS from "unocss/vite";
|
|
8
9
|
import path from "path";
|
|
9
10
|
import fse from "fs-extra";
|
|
10
11
|
import { simpleGit } from "simple-git";
|
|
@@ -102,6 +103,7 @@ export function defineProjectViteConfig(gctOpts = {}, opts = {}) {
|
|
|
102
103
|
json(),
|
|
103
104
|
vue(),
|
|
104
105
|
vueJsx(),
|
|
106
|
+
UnoCSS({ hmrTopLevelAwait: false }),
|
|
105
107
|
legacy({
|
|
106
108
|
targets: ["chrome>=85", "edge>=85", "firefox>=79", "safari>=14.1"],
|
|
107
109
|
externalSystemJS: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gct-paas/build",
|
|
3
|
-
"version": "0.1.5-dev.
|
|
3
|
+
"version": "0.1.5-dev.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "paas 平台核心包",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -88,6 +88,7 @@
|
|
|
88
88
|
"stylelint": "^17.0.0",
|
|
89
89
|
"stylelint-config-standard-scss": "^17.0.0",
|
|
90
90
|
"typescript-eslint": "^8.53.1",
|
|
91
|
+
"unocss": "66.6.2",
|
|
91
92
|
"vite": "^7.3.1",
|
|
92
93
|
"vite-plugin-dts": "^4.5.4",
|
|
93
94
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
@@ -108,5 +109,5 @@
|
|
|
108
109
|
"typescript": "^5.9.3",
|
|
109
110
|
"unbuild": "^3.6.1"
|
|
110
111
|
},
|
|
111
|
-
"gitHead": "
|
|
112
|
+
"gitHead": "72538ef9e35d776e677136b0253a0e132758eaf8"
|
|
112
113
|
}
|