@varlet/cli 2.0.5 → 2.1.0-alpha.1666877950844
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/README.en-US.md +2 -2
- package/README.md +2 -2
- package/cjs/babel.config.cjs +29 -0
- package/cjs/babel.sfc.transform.cjs +18 -0
- package/cjs/jest.config.cjs +33 -0
- package/cjs/jest.media.mock.cjs +1 -0
- package/cjs/jest.style.mock.cjs +1 -0
- package/client.d.ts +1 -0
- package/client.js +1 -0
- package/lib/client/appType.d.ts +4 -0
- package/lib/client/appType.js +7 -0
- package/lib/client/index.d.ts +17 -0
- package/lib/client/index.js +106 -0
- package/lib/{bin.d.ts → node/bin.d.ts} +2 -2
- package/lib/node/bin.js +122 -0
- package/lib/{commands → node/commands}/build.d.ts +1 -1
- package/lib/node/commands/build.js +15 -0
- package/lib/{commands → node/commands}/changelog.d.ts +6 -6
- package/lib/node/commands/changelog.js +20 -0
- package/lib/{commands → node/commands}/commitLint.d.ts +1 -1
- package/lib/node/commands/commitLint.js +45 -0
- package/lib/{commands → node/commands}/compile.d.ts +7 -7
- package/lib/node/commands/compile.js +35 -0
- package/lib/{commands → node/commands}/create.d.ts +8 -8
- package/lib/node/commands/create.js +91 -0
- package/lib/{commands → node/commands}/dev.d.ts +5 -5
- package/lib/node/commands/dev.js +38 -0
- package/lib/{commands → node/commands}/gen.d.ts +8 -8
- package/lib/node/commands/gen.js +75 -0
- package/lib/{commands → node/commands}/jest.d.ts +8 -8
- package/lib/node/commands/jest.js +27 -0
- package/lib/{commands → node/commands}/lint.d.ts +1 -1
- package/lib/node/commands/lint.js +41 -0
- package/lib/{commands → node/commands}/preview.d.ts +1 -1
- package/lib/node/commands/preview.js +18 -0
- package/lib/{commands → node/commands}/release.d.ts +5 -5
- package/lib/node/commands/release.js +146 -0
- package/lib/{commands → node/commands}/vite.d.ts +3 -3
- package/lib/node/commands/vite.js +13 -0
- package/lib/{compiler → node/compiler}/compileModule.d.ts +5 -5
- package/lib/node/compiler/compileModule.js +74 -0
- package/lib/{compiler → node/compiler}/compileSFC.d.ts +2 -2
- package/lib/node/compiler/compileSFC.js +79 -0
- package/lib/{compiler → node/compiler}/compileScript.d.ts +17 -17
- package/lib/node/compiler/compileScript.js +141 -0
- package/lib/{compiler → node/compiler}/compileSiteEntry.d.ts +13 -13
- package/lib/node/compiler/compileSiteEntry.js +128 -0
- package/lib/{compiler → node/compiler}/compileStyle.d.ts +11 -11
- package/lib/node/compiler/compileStyle.js +39 -0
- package/lib/{compiler → node/compiler}/compileTemplateHighlight.d.ts +10 -10
- package/lib/node/compiler/compileTemplateHighlight.js +133 -0
- package/lib/{compiler → node/compiler}/compileTypes.d.ts +2 -2
- package/lib/node/compiler/compileTypes.js +45 -0
- package/lib/{config → node/config}/varlet.config.d.ts +45 -44
- package/lib/node/config/varlet.config.js +27 -0
- package/lib/node/config/varlet.default.config.d.ts +2 -0
- package/lib/node/config/varlet.default.config.js +264 -0
- package/lib/node/config/vite.config.d.ts +6 -0
- package/lib/node/config/vite.config.js +144 -0
- package/lib/node/index.d.ts +1 -0
- package/lib/node/index.js +1 -0
- package/lib/{shared → node/shared}/constant.d.ts +42 -43
- package/lib/node/shared/constant.js +47 -0
- package/lib/{shared → node/shared}/fsUtils.d.ts +13 -12
- package/lib/node/shared/fsUtils.js +48 -0
- package/lib/{shared → node/shared}/logger.d.ts +8 -8
- package/lib/node/shared/logger.js +18 -0
- package/package.json +22 -19
- package/{preset.js → preset.cjs} +1 -1
- package/site/components/button/index.ts +10 -10
- package/site/components/cell/index.ts +10 -10
- package/site/components/code-example/CodeExample.vue +2 -1
- package/site/components/code-example/codeExample.less +41 -41
- package/site/components/code-example/index.ts +10 -10
- package/site/components/context/zIndex.ts +20 -20
- package/site/components/icon/icon.less +26 -26
- package/site/components/icon/index.ts +10 -10
- package/site/components/icon/props.ts +24 -24
- package/site/components/loading/index.ts +10 -10
- package/site/components/progress/index.ts +10 -10
- package/site/components/snackbar/snackbar.less +135 -135
- package/site/components/styles/common.less +64 -64
- package/site/components/styles/elevation.less +126 -126
- package/site/components/styles/var.less +27 -27
- package/site/components/utils/components.ts +1 -4
- package/site/components/utils/elements.ts +1 -1
- package/site/index.html +49 -49
- package/site/mobile/App.vue +27 -26
- package/site/mobile/components/AppHome.vue +2 -1
- package/site/mobile/components/app-bar/index.ts +10 -10
- package/site/mobile/components/app-bar/props.ts +25 -25
- package/site/mobile.html +41 -41
- package/site/module.d.ts +5 -5
- package/site/pc/App.vue +2 -1
- package/site/pc/Layout.vue +2 -1
- package/site/pc/components/AppHeader.vue +4 -2
- package/site/pc/pages/index/index.vue +8 -4
- package/site/tsconfig.json +11 -11
- package/site/useProgress.ts +2 -1
- package/site/utils.ts +6 -137
- package/template/generators/config/default/base/{varlet.config.js → varlet.config.mjs} +2 -2
- package/template/generators/config/i18n/base/{varlet.config.js → varlet.config.mjs} +2 -2
- package/tsconfig.json +2 -9
- package/lib/bin.js +0 -102
- package/lib/commands/build.js +0 -67
- package/lib/commands/changelog.js +0 -27
- package/lib/commands/commitLint.js +0 -21
- package/lib/commands/compile.js +0 -119
- package/lib/commands/create.js +0 -166
- package/lib/commands/dev.js +0 -123
- package/lib/commands/gen.js +0 -138
- package/lib/commands/jest.js +0 -85
- package/lib/commands/lint.js +0 -123
- package/lib/commands/preview.js +0 -74
- package/lib/commands/release.js +0 -270
- package/lib/commands/vite.js +0 -69
- package/lib/compiler/compileModule.js +0 -190
- package/lib/compiler/compileSFC.js +0 -135
- package/lib/compiler/compileScript.js +0 -194
- package/lib/compiler/compileSiteEntry.js +0 -237
- package/lib/compiler/compileStyle.js +0 -91
- package/lib/compiler/compileTemplateHighlight.js +0 -193
- package/lib/compiler/compileTypes.js +0 -85
- package/lib/config/babel.config.d.ts +0 -2
- package/lib/config/babel.config.js +0 -31
- package/lib/config/babel.sfc.transform.d.ts +0 -1
- package/lib/config/babel.sfc.transform.js +0 -18
- package/lib/config/jest.config.d.ts +0 -1
- package/lib/config/jest.config.js +0 -37
- package/lib/config/jest.media.mock.d.ts +0 -0
- package/lib/config/jest.media.mock.js +0 -2
- package/lib/config/jest.style.mock.d.ts +0 -0
- package/lib/config/jest.style.mock.js +0 -2
- package/lib/config/varlet.config.js +0 -35
- package/lib/config/vite.config.d.ts +0 -5
- package/lib/config/vite.config.js +0 -162
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -5
- package/lib/shared/constant.js +0 -50
- package/lib/shared/fsUtils.js +0 -108
- package/lib/shared/logger.js +0 -23
- package/site/mobile/components/AppType.vue +0 -22
- package/varlet.default.config.js +0 -267
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.getUMDConfig = exports.getESMBundleConfig = exports.getBuildConfig = exports.getDevConfig = void 0;
|
|
18
|
-
var plugin_vue_1 = __importDefault(require("@vitejs/plugin-vue"));
|
|
19
|
-
var markdown_vite_plugin_1 = __importDefault(require("@varlet/markdown-vite-plugin"));
|
|
20
|
-
var plugin_vue_jsx_1 = __importDefault(require("@vitejs/plugin-vue-jsx"));
|
|
21
|
-
var vite_plugin_html_1 = require("vite-plugin-html");
|
|
22
|
-
var constant_1 = require("../shared/constant");
|
|
23
|
-
var lodash_1 = require("lodash");
|
|
24
|
-
var shared_1 = require("@varlet/shared");
|
|
25
|
-
var path_1 = require("path");
|
|
26
|
-
var fs_extra_1 = require("fs-extra");
|
|
27
|
-
function getDevConfig(varletConfig) {
|
|
28
|
-
var defaultLanguage = (0, lodash_1.get)(varletConfig, 'defaultLanguage');
|
|
29
|
-
var host = (0, lodash_1.get)(varletConfig, 'host');
|
|
30
|
-
return {
|
|
31
|
-
root: constant_1.SITE_DIR,
|
|
32
|
-
resolve: {
|
|
33
|
-
extensions: constant_1.VITE_RESOLVE_EXTENSIONS,
|
|
34
|
-
alias: {
|
|
35
|
-
'@config': constant_1.SITE_CONFIG,
|
|
36
|
-
'@pc-routes': constant_1.SITE_PC_ROUTES,
|
|
37
|
-
'@mobile-routes': constant_1.SITE_MOBILE_ROUTES,
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
server: {
|
|
41
|
-
port: (0, lodash_1.get)(varletConfig, 'port'),
|
|
42
|
-
host: host === 'localhost' ? '0.0.0.0' : host,
|
|
43
|
-
},
|
|
44
|
-
publicDir: constant_1.SITE_PUBLIC_PATH,
|
|
45
|
-
plugins: [
|
|
46
|
-
(0, plugin_vue_1.default)({
|
|
47
|
-
include: [/\.vue$/, /\.md$/],
|
|
48
|
-
}),
|
|
49
|
-
(0, markdown_vite_plugin_1.default)({ style: (0, lodash_1.get)(varletConfig, 'highlight.style') }),
|
|
50
|
-
(0, plugin_vue_jsx_1.default)(),
|
|
51
|
-
(0, vite_plugin_html_1.injectHtml)({
|
|
52
|
-
data: {
|
|
53
|
-
pcTitle: (0, lodash_1.get)(varletConfig, "pc.title['".concat(defaultLanguage, "']")),
|
|
54
|
-
mobileTitle: (0, lodash_1.get)(varletConfig, "mobile.title['".concat(defaultLanguage, "']")),
|
|
55
|
-
logo: (0, lodash_1.get)(varletConfig, "logo"),
|
|
56
|
-
baidu: (0, lodash_1.get)(varletConfig, "analysis.baidu", ''),
|
|
57
|
-
},
|
|
58
|
-
}),
|
|
59
|
-
],
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
exports.getDevConfig = getDevConfig;
|
|
63
|
-
function getBuildConfig(varletConfig) {
|
|
64
|
-
var devConfig = getDevConfig(varletConfig);
|
|
65
|
-
return __assign(__assign({}, devConfig), { base: './', build: {
|
|
66
|
-
outDir: constant_1.SITE_OUTPUT_PATH,
|
|
67
|
-
reportCompressedSize: false,
|
|
68
|
-
emptyOutDir: true,
|
|
69
|
-
cssTarget: 'chrome61',
|
|
70
|
-
rollupOptions: {
|
|
71
|
-
input: {
|
|
72
|
-
main: (0, path_1.resolve)(constant_1.SITE_DIR, 'index.html'),
|
|
73
|
-
mobile: (0, path_1.resolve)(constant_1.SITE_DIR, 'mobile.html'),
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
} });
|
|
77
|
-
}
|
|
78
|
-
exports.getBuildConfig = getBuildConfig;
|
|
79
|
-
function inlineCSS(fileName, dir) {
|
|
80
|
-
return {
|
|
81
|
-
name: 'varlet-inline-css-vite-plugin',
|
|
82
|
-
apply: 'build',
|
|
83
|
-
closeBundle: function () {
|
|
84
|
-
var cssFile = (0, path_1.resolve)(dir, 'style.css');
|
|
85
|
-
if (!(0, fs_extra_1.pathExistsSync)(cssFile)) {
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
var jsFile = (0, path_1.resolve)(dir, fileName);
|
|
89
|
-
var cssCode = (0, fs_extra_1.readFileSync)(cssFile, 'utf-8');
|
|
90
|
-
var jsCode = (0, fs_extra_1.readFileSync)(jsFile, 'utf-8');
|
|
91
|
-
var injectCode = ";(function(){var style=document.createElement('style');style.type='text/css';style.rel='stylesheet';style.appendChild(document.createTextNode(`".concat(cssCode.replace(/\\/g, '\\\\'), "`));var head=document.querySelector('head');head.appendChild(style)})();");
|
|
92
|
-
(0, fs_extra_1.writeFileSync)(jsFile, "".concat(injectCode).concat(jsCode));
|
|
93
|
-
(0, fs_extra_1.copyFileSync)(cssFile, (0, path_1.resolve)(constant_1.LIB_DIR, 'style.css'));
|
|
94
|
-
(0, fs_extra_1.removeSync)(cssFile);
|
|
95
|
-
},
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
function clear() {
|
|
99
|
-
return {
|
|
100
|
-
name: 'varlet-clear-vite-plugin',
|
|
101
|
-
apply: 'build',
|
|
102
|
-
closeBundle: function () {
|
|
103
|
-
(0, fs_extra_1.removeSync)((0, path_1.resolve)(constant_1.CWD, 'dist'));
|
|
104
|
-
},
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
function getESMBundleConfig(varletConfig) {
|
|
108
|
-
var name = (0, lodash_1.get)(varletConfig, 'name');
|
|
109
|
-
var fileName = "".concat((0, shared_1.kebabCase)(name), ".esm.js");
|
|
110
|
-
return {
|
|
111
|
-
logLevel: 'silent',
|
|
112
|
-
build: {
|
|
113
|
-
emptyOutDir: true,
|
|
114
|
-
lib: {
|
|
115
|
-
name: name,
|
|
116
|
-
formats: ['es'],
|
|
117
|
-
fileName: function () { return fileName; },
|
|
118
|
-
entry: (0, path_1.resolve)(constant_1.ES_DIR, 'umdIndex.js'),
|
|
119
|
-
},
|
|
120
|
-
rollupOptions: {
|
|
121
|
-
external: ['vue'],
|
|
122
|
-
output: {
|
|
123
|
-
dir: constant_1.ES_DIR,
|
|
124
|
-
exports: 'named',
|
|
125
|
-
globals: {
|
|
126
|
-
vue: 'Vue',
|
|
127
|
-
},
|
|
128
|
-
},
|
|
129
|
-
},
|
|
130
|
-
},
|
|
131
|
-
plugins: [clear()],
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
exports.getESMBundleConfig = getESMBundleConfig;
|
|
135
|
-
function getUMDConfig(varletConfig) {
|
|
136
|
-
var name = (0, lodash_1.get)(varletConfig, 'name');
|
|
137
|
-
var fileName = "".concat((0, shared_1.kebabCase)(name), ".js");
|
|
138
|
-
return {
|
|
139
|
-
logLevel: 'silent',
|
|
140
|
-
build: {
|
|
141
|
-
emptyOutDir: true,
|
|
142
|
-
lib: {
|
|
143
|
-
name: name,
|
|
144
|
-
formats: ['umd'],
|
|
145
|
-
fileName: function () { return fileName; },
|
|
146
|
-
entry: (0, path_1.resolve)(constant_1.ES_DIR, 'umdIndex.js'),
|
|
147
|
-
},
|
|
148
|
-
rollupOptions: {
|
|
149
|
-
external: ['vue'],
|
|
150
|
-
output: {
|
|
151
|
-
dir: constant_1.UMD_DIR,
|
|
152
|
-
exports: 'named',
|
|
153
|
-
globals: {
|
|
154
|
-
vue: 'Vue',
|
|
155
|
-
},
|
|
156
|
-
},
|
|
157
|
-
},
|
|
158
|
-
},
|
|
159
|
-
plugins: [inlineCSS(fileName, constant_1.UMD_DIR), clear()],
|
|
160
|
-
};
|
|
161
|
-
}
|
|
162
|
-
exports.getUMDConfig = getUMDConfig;
|
package/lib/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { defineConfig } from './config/varlet.config';
|
package/lib/index.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.defineConfig = void 0;
|
|
4
|
-
var varlet_config_1 = require("./config/varlet.config");
|
|
5
|
-
Object.defineProperty(exports, "defineConfig", { enumerable: true, get: function () { return varlet_config_1.defineConfig; } });
|
package/lib/shared/constant.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.JEST_STYLE_MOCK = exports.JEST_MEDIA_MOCK = exports.JEST_CONFIG = exports.HL_WEB_TYPES_JSON = exports.HL_ATTRIBUTES_JSON = exports.HL_TAGS_JSON = exports.HL_DIR = exports.HL_MD = exports.HL_TITLE_SLOTS_RE = exports.HL_TITLE_EVENTS_RE = exports.HL_TITLE_ATTRIBUTES_RE = exports.HL_API_RE = exports.HL_COMPONENT_NAME_RE = exports.SITE_CONFIG = exports.SITE_MOBILE_ROUTES = exports.SITE_PC_ROUTES = exports.SITE_PC_DIR = exports.SITE_DIR = exports.SITE_PUBLIC_PATH = exports.SITE_OUTPUT_PATH = exports.SITE = exports.CLI_PACKAGE_JSON = exports.UI_PACKAGE_JSON = exports.GENERATORS_DIR = exports.TESTS_DIR_NAME = exports.DIR_INDEX = exports.DOCS_DIR_NAME = exports.LOCALE_DIR_NAME = exports.EXAMPLE_DIR_NAME = exports.STYLE_DIR_NAME = exports.PUBLIC_DIR_INDEXES = exports.SCRIPTS_EXTENSIONS = exports.VITE_RESOLVE_EXTENSIONS = exports.ESLINT_EXTENSIONS = exports.ROOT_PAGES_DIR = exports.ROOT_DOCS_DIR = exports.TYPES_DIR = exports.UMD_DIR = exports.LIB_DIR = exports.ES_DIR = exports.SRC_DIR = exports.VARLET_CONFIG = exports.CWD = void 0;
|
|
4
|
-
var path_1 = require("path");
|
|
5
|
-
exports.CWD = process.cwd();
|
|
6
|
-
exports.VARLET_CONFIG = (0, path_1.resolve)(exports.CWD, 'varlet.config.js');
|
|
7
|
-
exports.SRC_DIR = (0, path_1.resolve)(exports.CWD, 'src');
|
|
8
|
-
exports.ES_DIR = (0, path_1.resolve)(exports.CWD, 'es');
|
|
9
|
-
exports.LIB_DIR = (0, path_1.resolve)(exports.CWD, 'lib');
|
|
10
|
-
exports.UMD_DIR = (0, path_1.resolve)(exports.CWD, 'umd');
|
|
11
|
-
exports.TYPES_DIR = (0, path_1.resolve)(exports.CWD, 'types');
|
|
12
|
-
exports.ROOT_DOCS_DIR = (0, path_1.resolve)(exports.CWD, 'docs');
|
|
13
|
-
exports.ROOT_PAGES_DIR = (0, path_1.resolve)(exports.CWD, 'pages');
|
|
14
|
-
exports.ESLINT_EXTENSIONS = ['.vue', '.ts', '.js', '.mjs', '.tsx', '.jsx'];
|
|
15
|
-
exports.VITE_RESOLVE_EXTENSIONS = ['.vue', '.tsx', '.ts', '.jsx', '.js', '.less', '.css'];
|
|
16
|
-
exports.SCRIPTS_EXTENSIONS = ['.tsx', '.ts', '.jsx', '.js'];
|
|
17
|
-
exports.PUBLIC_DIR_INDEXES = ['index.vue', 'index.tsx', 'index.ts', 'index.jsx', 'index.js'];
|
|
18
|
-
exports.STYLE_DIR_NAME = 'style';
|
|
19
|
-
exports.EXAMPLE_DIR_NAME = 'example';
|
|
20
|
-
exports.LOCALE_DIR_NAME = 'locale';
|
|
21
|
-
exports.DOCS_DIR_NAME = 'docs';
|
|
22
|
-
exports.DIR_INDEX = 'index.vue';
|
|
23
|
-
exports.TESTS_DIR_NAME = '__tests__';
|
|
24
|
-
exports.GENERATORS_DIR = (0, path_1.resolve)(__dirname, '../../template/generators');
|
|
25
|
-
exports.UI_PACKAGE_JSON = (0, path_1.resolve)(exports.CWD, 'package.json');
|
|
26
|
-
exports.CLI_PACKAGE_JSON = (0, path_1.resolve)(__dirname, '../../package.json');
|
|
27
|
-
// site
|
|
28
|
-
exports.SITE = (0, path_1.resolve)(__dirname, '../../site');
|
|
29
|
-
exports.SITE_OUTPUT_PATH = (0, path_1.resolve)(exports.CWD, 'site');
|
|
30
|
-
exports.SITE_PUBLIC_PATH = (0, path_1.resolve)(exports.CWD, 'public');
|
|
31
|
-
exports.SITE_DIR = (0, path_1.resolve)(exports.CWD, '.varlet/site');
|
|
32
|
-
exports.SITE_PC_DIR = (0, path_1.resolve)(exports.CWD, '.varlet/site/pc');
|
|
33
|
-
exports.SITE_PC_ROUTES = (0, path_1.resolve)(exports.CWD, '.varlet/pc.routes.ts');
|
|
34
|
-
exports.SITE_MOBILE_ROUTES = (0, path_1.resolve)(exports.CWD, '.varlet/mobile.routes.ts');
|
|
35
|
-
exports.SITE_CONFIG = (0, path_1.resolve)(exports.CWD, '.varlet/site.config.json');
|
|
36
|
-
// template highlight
|
|
37
|
-
exports.HL_COMPONENT_NAME_RE = /.*(\/|\\)(.+)(\/|\\)docs(\/|\\)/;
|
|
38
|
-
exports.HL_API_RE = /##\s*API\n+/;
|
|
39
|
-
exports.HL_TITLE_ATTRIBUTES_RE = /###\s*属性\s*\n+/;
|
|
40
|
-
exports.HL_TITLE_EVENTS_RE = /###\s*事件\s*\n+/;
|
|
41
|
-
exports.HL_TITLE_SLOTS_RE = /###\s*插槽\s*\n+/;
|
|
42
|
-
exports.HL_MD = 'zh-CN.md';
|
|
43
|
-
exports.HL_DIR = (0, path_1.resolve)(exports.CWD, 'highlight');
|
|
44
|
-
exports.HL_TAGS_JSON = (0, path_1.resolve)(exports.HL_DIR, 'tags.json');
|
|
45
|
-
exports.HL_ATTRIBUTES_JSON = (0, path_1.resolve)(exports.HL_DIR, 'attributes.json');
|
|
46
|
-
exports.HL_WEB_TYPES_JSON = (0, path_1.resolve)(exports.HL_DIR, 'web-types.json');
|
|
47
|
-
// jest
|
|
48
|
-
exports.JEST_CONFIG = (0, path_1.resolve)(__dirname, '../config/jest.config.js');
|
|
49
|
-
exports.JEST_MEDIA_MOCK = (0, path_1.resolve)(__dirname, '../config/jest.media.mock.js');
|
|
50
|
-
exports.JEST_STYLE_MOCK = (0, path_1.resolve)(__dirname, '../config/jest.style.mock.js');
|
package/lib/shared/fsUtils.js
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
-
};
|
|
41
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
exports.glob = exports.outputFileSyncOnChange = exports.smartAppendFileSync = exports.replaceExt = exports.isPublicDir = exports.isLess = exports.isScript = exports.isDTS = exports.isSFC = exports.isDir = exports.isMD = exports.getPublicDirs = void 0;
|
|
43
|
-
var path_1 = require("path");
|
|
44
|
-
var fs_extra_1 = require("fs-extra");
|
|
45
|
-
var constant_1 = require("./constant");
|
|
46
|
-
var glob_1 = __importDefault(require("glob"));
|
|
47
|
-
function getPublicDirs() {
|
|
48
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
49
|
-
var srcDir;
|
|
50
|
-
return __generator(this, function (_a) {
|
|
51
|
-
switch (_a.label) {
|
|
52
|
-
case 0: return [4 /*yield*/, (0, fs_extra_1.readdir)(constant_1.SRC_DIR)];
|
|
53
|
-
case 1:
|
|
54
|
-
srcDir = _a.sent();
|
|
55
|
-
return [2 /*return*/, srcDir.filter(function (filename) { return (0, exports.isPublicDir)((0, path_1.resolve)(constant_1.SRC_DIR, filename)); })];
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
exports.getPublicDirs = getPublicDirs;
|
|
61
|
-
var isMD = function (file) { return (0, fs_extra_1.pathExistsSync)(file) && (0, path_1.extname)(file) === '.md'; };
|
|
62
|
-
exports.isMD = isMD;
|
|
63
|
-
var isDir = function (file) { return (0, fs_extra_1.pathExistsSync)(file) && (0, fs_extra_1.lstatSync)(file).isDirectory(); };
|
|
64
|
-
exports.isDir = isDir;
|
|
65
|
-
var isSFC = function (file) { return (0, fs_extra_1.pathExistsSync)(file) && (0, path_1.extname)(file) === '.vue'; };
|
|
66
|
-
exports.isSFC = isSFC;
|
|
67
|
-
var isDTS = function (file) { return (0, fs_extra_1.pathExistsSync)(file) && file.endsWith('.d.ts'); };
|
|
68
|
-
exports.isDTS = isDTS;
|
|
69
|
-
var isScript = function (file) { return (0, fs_extra_1.pathExistsSync)(file) && constant_1.SCRIPTS_EXTENSIONS.includes((0, path_1.extname)(file)); };
|
|
70
|
-
exports.isScript = isScript;
|
|
71
|
-
var isLess = function (file) { return (0, fs_extra_1.pathExistsSync)(file) && (0, path_1.extname)(file) === '.less'; };
|
|
72
|
-
exports.isLess = isLess;
|
|
73
|
-
var isPublicDir = function (dir) {
|
|
74
|
-
return constant_1.PUBLIC_DIR_INDEXES.some(function (index) { return (0, fs_extra_1.pathExistsSync)((0, path_1.resolve)(dir, index)); });
|
|
75
|
-
};
|
|
76
|
-
exports.isPublicDir = isPublicDir;
|
|
77
|
-
var replaceExt = function (file, ext) { return file.replace((0, path_1.extname)(file), ext); };
|
|
78
|
-
exports.replaceExt = replaceExt;
|
|
79
|
-
function smartAppendFileSync(file, code) {
|
|
80
|
-
if ((0, fs_extra_1.pathExistsSync)(file)) {
|
|
81
|
-
var content = (0, fs_extra_1.readFileSync)(file, 'utf-8');
|
|
82
|
-
if (!content.includes(code)) {
|
|
83
|
-
(0, fs_extra_1.appendFileSync)(file, code);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
exports.smartAppendFileSync = smartAppendFileSync;
|
|
88
|
-
function outputFileSyncOnChange(path, code) {
|
|
89
|
-
(0, fs_extra_1.ensureFileSync)(path);
|
|
90
|
-
var content = (0, fs_extra_1.readFileSync)(path, 'utf-8');
|
|
91
|
-
if (content !== code) {
|
|
92
|
-
(0, fs_extra_1.outputFileSync)(path, code);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
exports.outputFileSyncOnChange = outputFileSyncOnChange;
|
|
96
|
-
function glob(pattern) {
|
|
97
|
-
return new Promise(function (resolve, reject) {
|
|
98
|
-
(0, glob_1.default)(pattern, function (err, files) {
|
|
99
|
-
if (err) {
|
|
100
|
-
reject(err);
|
|
101
|
-
}
|
|
102
|
-
else {
|
|
103
|
-
resolve(files);
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
exports.glob = glob;
|
package/lib/shared/logger.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var chalk_1 = __importDefault(require("chalk"));
|
|
7
|
-
exports.default = {
|
|
8
|
-
info: function (text) {
|
|
9
|
-
console.log(text);
|
|
10
|
-
},
|
|
11
|
-
success: function (text) {
|
|
12
|
-
console.log(chalk_1.default.hex('#00c48f')(text));
|
|
13
|
-
},
|
|
14
|
-
warning: function (text) {
|
|
15
|
-
console.log(chalk_1.default.hex('#ff9800')(text));
|
|
16
|
-
},
|
|
17
|
-
error: function (text) {
|
|
18
|
-
console.log(chalk_1.default.hex('#f44336')(text));
|
|
19
|
-
},
|
|
20
|
-
title: function (text) {
|
|
21
|
-
console.log(chalk_1.default.cyan(text));
|
|
22
|
-
},
|
|
23
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="app-type">
|
|
3
|
-
<slot />
|
|
4
|
-
</div>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script lang="ts">
|
|
8
|
-
import { defineComponent } from 'vue'
|
|
9
|
-
|
|
10
|
-
export default defineComponent({
|
|
11
|
-
name: 'AppType',
|
|
12
|
-
})
|
|
13
|
-
</script>
|
|
14
|
-
|
|
15
|
-
<style lang="less">
|
|
16
|
-
.app-type {
|
|
17
|
-
width: 100%;
|
|
18
|
-
padding: 15px 0;
|
|
19
|
-
color: var(--site-config-color-sub-text);
|
|
20
|
-
font-size: 14px;
|
|
21
|
-
}
|
|
22
|
-
</style>
|
package/varlet.default.config.js
DELETED
|
@@ -1,267 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
name: 'Varlet',
|
|
3
|
-
namespace: 'var',
|
|
4
|
-
host: 'localhost',
|
|
5
|
-
port: 8080,
|
|
6
|
-
title: 'VARLET',
|
|
7
|
-
logo: 'https://varlet.gitee.io/varlet-ui/varlet_icon.png',
|
|
8
|
-
defaultLanguage: 'zh-CN',
|
|
9
|
-
highlight: {
|
|
10
|
-
/**
|
|
11
|
-
* @see https://highlightjs.org/
|
|
12
|
-
*/
|
|
13
|
-
style: '//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.3.2/styles/nord.min.css',
|
|
14
|
-
},
|
|
15
|
-
analysis: {
|
|
16
|
-
baidu: '',
|
|
17
|
-
},
|
|
18
|
-
useMobile: false,
|
|
19
|
-
pc: {
|
|
20
|
-
menu: [],
|
|
21
|
-
redirect: '/index',
|
|
22
|
-
indexPage: {
|
|
23
|
-
description: {
|
|
24
|
-
'zh-CN':
|
|
25
|
-
'Varlet 是一个基于 Vue3 开发的 Material 风格移动端组件库,全面拥抱 Vue3 生态,由社区团队维护。支持 Typescript、按需引入、暗黑模式、主题定制、国际化,并提供 VSCode 插件保障良好的开发体验',
|
|
26
|
-
'en-US':
|
|
27
|
-
'Varlet is a Material design mobile component library developed based on Vue3, developed and maintained by partners in the community. Support Typescript, import on demand, dark mode, theme customization, internationalization, and provide VSCode plugin to ensure a good development experience',
|
|
28
|
-
},
|
|
29
|
-
started: {
|
|
30
|
-
'zh-CN': '起步',
|
|
31
|
-
'en-US': 'GET STARTED',
|
|
32
|
-
},
|
|
33
|
-
features: [
|
|
34
|
-
{
|
|
35
|
-
name: {
|
|
36
|
-
'zh-CN': '组件丰富',
|
|
37
|
-
'en-US': 'Rich components',
|
|
38
|
-
},
|
|
39
|
-
description: {
|
|
40
|
-
'zh-CN': '提供 50 个高质量通用组件',
|
|
41
|
-
'en-US': 'Provide 50 high quality general purpose components',
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
name: {
|
|
46
|
-
'zh-CN': '按需引入',
|
|
47
|
-
'en-US': 'On-Demand',
|
|
48
|
-
},
|
|
49
|
-
description: {
|
|
50
|
-
'zh-CN': '每一个组件都可单独引入,并有着良好的 tree-shaking 优化',
|
|
51
|
-
'en-US': 'Each component can be imported separately and has good tree-shaking optimization',
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
name: {
|
|
56
|
-
'zh-CN': '主题定制',
|
|
57
|
-
'en-US': 'Theme customization',
|
|
58
|
-
},
|
|
59
|
-
description: {
|
|
60
|
-
'zh-CN': '内置亮色和暗色两种主题,支持组件的样式自定义',
|
|
61
|
-
'en-US': 'Built-in light and dark themes, support style customization of components',
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
name: {
|
|
66
|
-
'zh-CN': '国际化',
|
|
67
|
-
'en-US': 'Locale',
|
|
68
|
-
},
|
|
69
|
-
description: {
|
|
70
|
-
'zh-CN': '内置国际化 API,内置中文和英文的语言包',
|
|
71
|
-
'en-US': 'Built-in i18n API, which supports both Chinese and English languages by default',
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
name: {
|
|
76
|
-
'zh-CN': '支持 Typescript',
|
|
77
|
-
'en-US': 'Support typescript',
|
|
78
|
-
},
|
|
79
|
-
description: {
|
|
80
|
-
'zh-CN': '使用 Typescript 构建,提供良好的组件类型系统',
|
|
81
|
-
'en-US': 'Built with typescript, which provides a nice components type system',
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
name: {
|
|
86
|
-
'zh-CN': '服务端渲染',
|
|
87
|
-
'en-US': 'Server-side rendering',
|
|
88
|
-
},
|
|
89
|
-
description: {
|
|
90
|
-
'zh-CN': '对服务端渲染支持良好,并对 Nuxt 进行了适配',
|
|
91
|
-
'en-US': 'Good support for server-side rendering and adaptation to Nuxt',
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
name: {
|
|
96
|
-
'zh-CN': '国人开发',
|
|
97
|
-
'en-US': 'Developed by Chinese',
|
|
98
|
-
},
|
|
99
|
-
description: {
|
|
100
|
-
'zh-CN': '由国人开发,完善的中英文文档和后勤保障',
|
|
101
|
-
'en-US': 'Complete Chinese and English documentation and logistics support',
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
name: {
|
|
106
|
-
'zh-CN': 'IDE 支持',
|
|
107
|
-
'en-US': 'IDE Code Support',
|
|
108
|
-
},
|
|
109
|
-
description: {
|
|
110
|
-
'zh-CN': '支持在 webstorm,vscode 中的组件语法高亮, 并提供 vscode 插件为开发提升效率',
|
|
111
|
-
'en-US':
|
|
112
|
-
'Supports to highlight the component syntax for webstorm and vscode, and provides a separate helper plugin for vscode',
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
name: {
|
|
117
|
-
'zh-CN': '组件库快速成型工具',
|
|
118
|
-
'en-US': 'Component library toolchain',
|
|
119
|
-
},
|
|
120
|
-
description: {
|
|
121
|
-
'zh-CN': '开源了搭建本组件库的所有工具链,提供快速开发组件库的能力',
|
|
122
|
-
'en-US':
|
|
123
|
-
'Open-sourced the toolchain for building this component library, providing the ability to rapidly develop the component library',
|
|
124
|
-
},
|
|
125
|
-
},
|
|
126
|
-
],
|
|
127
|
-
contributors: {
|
|
128
|
-
label: {
|
|
129
|
-
'zh-CN': '贡献者',
|
|
130
|
-
'en-US': 'Contributors',
|
|
131
|
-
},
|
|
132
|
-
link: 'https://github.com/varletjs/varlet/graphs/contributors',
|
|
133
|
-
image: 'https://contrib.rocks/image?repo=varletjs/varlet',
|
|
134
|
-
},
|
|
135
|
-
license: {
|
|
136
|
-
'zh-CN': '组件库基于 MIT 协议,您可以自由的使用和分享',
|
|
137
|
-
'en-US': 'Released under the MIT License, You can use and share freely.',
|
|
138
|
-
},
|
|
139
|
-
copyright: {
|
|
140
|
-
'zh-CN': 'Copyright © 2022 varletjs 组织成员以及 varlet 的贡献者们',
|
|
141
|
-
'en-US': 'Copyright © 2022 varletjs member and varlet contributors.',
|
|
142
|
-
},
|
|
143
|
-
},
|
|
144
|
-
title: {
|
|
145
|
-
'zh-CN': '面向 Vue3 的 Material 风格移动端组件库',
|
|
146
|
-
'en-US': 'Material design mobile components built for Vue3',
|
|
147
|
-
},
|
|
148
|
-
header: {
|
|
149
|
-
i18n: {
|
|
150
|
-
'zh-CN': '中文',
|
|
151
|
-
'en-US': 'English',
|
|
152
|
-
},
|
|
153
|
-
versions: null,
|
|
154
|
-
github: 'https://github.com/varletjs/varlet',
|
|
155
|
-
playground: 'https://varlet.gitee.io/varlet-ui-playground',
|
|
156
|
-
darkMode: true,
|
|
157
|
-
},
|
|
158
|
-
clipboard: {
|
|
159
|
-
'zh-CN': '代码已复制到剪切板',
|
|
160
|
-
'en-US': 'The code has been copied to the clipboard',
|
|
161
|
-
},
|
|
162
|
-
fold: {
|
|
163
|
-
defaultFold: false,
|
|
164
|
-
foldHeight: 50,
|
|
165
|
-
},
|
|
166
|
-
},
|
|
167
|
-
mobile: {
|
|
168
|
-
redirect: '/home',
|
|
169
|
-
title: {
|
|
170
|
-
'zh-CN': '面向 Vue3 的 Material 风格移动端组件库',
|
|
171
|
-
'en-US': 'Material design mobile components built for Vue3',
|
|
172
|
-
},
|
|
173
|
-
header: {
|
|
174
|
-
i18n: {
|
|
175
|
-
'zh-CN': '中文',
|
|
176
|
-
'en-US': 'English',
|
|
177
|
-
},
|
|
178
|
-
github: 'https://github.com/varletjs/varlet',
|
|
179
|
-
darkMode: true,
|
|
180
|
-
},
|
|
181
|
-
},
|
|
182
|
-
themeKey: 'VARLET_THEME',
|
|
183
|
-
lightTheme: {
|
|
184
|
-
'color-body': '#fff',
|
|
185
|
-
'color-index-page-background': '#f2f2f2',
|
|
186
|
-
'color-index-page-feature-background': '#fff',
|
|
187
|
-
'color-index-page-logo-mask-background': 'linear-gradient(-45deg, #8baff8 50%, #84e0ff 50%)',
|
|
188
|
-
'color-index-page-second-text-color': 'rgba(60, 60, 60, .7)',
|
|
189
|
-
'color-index-page-divider-color': '#ddd',
|
|
190
|
-
'color-bar': '#fff',
|
|
191
|
-
'color-sub-bar': '#f5f5f5',
|
|
192
|
-
'color-text': '#555',
|
|
193
|
-
'color-sub-text': '#888',
|
|
194
|
-
'color-border': 'rgba(0, 0, 0, 0.12)',
|
|
195
|
-
'color-shadow': '#eee',
|
|
196
|
-
'color-introduce-border': '#2196f3',
|
|
197
|
-
'color-primary': '#2196f3',
|
|
198
|
-
'color-link': '#00c48f',
|
|
199
|
-
'color-type': '#00c48f',
|
|
200
|
-
'color-progress': '#1d92e9',
|
|
201
|
-
'color-progress-track': 'transparent',
|
|
202
|
-
'color-side-bar': '#3a7afe',
|
|
203
|
-
'color-side-bar-active-background': '#3a7afe1a',
|
|
204
|
-
'color-app-bar': '#3a7afe',
|
|
205
|
-
'color-nav-button-hover-background': 'rgba(0, 0, 0, 0.08)',
|
|
206
|
-
'color-mobile-cell-hover': '#3a7afe',
|
|
207
|
-
'color-pc-language-active': '#3a7afe',
|
|
208
|
-
'color-pc-language-active-background': '#edf5ff',
|
|
209
|
-
'color-pc-github-active-background': '#212121',
|
|
210
|
-
'color-mobile-language-active': '#3a7afe',
|
|
211
|
-
'color-mobile-language-active-background': '#edf5ff',
|
|
212
|
-
'color-hl-background': '#fafafa',
|
|
213
|
-
'color-hl-code': '#58727e',
|
|
214
|
-
'color-hl-border': '#f3f3f3',
|
|
215
|
-
'color-hl-group-a': '#7c7c7c',
|
|
216
|
-
'color-hl-group-b': '#2196f3',
|
|
217
|
-
'color-hl-group-c': '#ff9422',
|
|
218
|
-
'color-hl-group-d': '#58c193',
|
|
219
|
-
'color-hl-group-e': '#ff9422',
|
|
220
|
-
'color-hl-group-f': '#ff9422',
|
|
221
|
-
'color-hl-group-g': '#ff9422',
|
|
222
|
-
'color-hl-group-h': '#06a6e9',
|
|
223
|
-
'color-hl-group-i': '#f23733',
|
|
224
|
-
},
|
|
225
|
-
darkTheme: {
|
|
226
|
-
'color-body': '#121212',
|
|
227
|
-
'color-index-page-background': '#1e1e1e',
|
|
228
|
-
'color-index-page-feature-background': '#303030',
|
|
229
|
-
'color-index-page-logo-mask-background': 'linear-gradient(-45deg, #729dfc 50%, #6859f4 50%)',
|
|
230
|
-
'color-index-page-second-text-color': 'rgba(255, 255, 255, .75)',
|
|
231
|
-
'color-index-page-divider-color': 'rgba(84, 84, 84, .8)',
|
|
232
|
-
'color-bar': '#1e1e1e',
|
|
233
|
-
'color-sub-bar': '#272727',
|
|
234
|
-
'color-text': '#fff',
|
|
235
|
-
'color-sub-text': '#aaa',
|
|
236
|
-
'color-border': '#333',
|
|
237
|
-
'color-shadow': '#121212',
|
|
238
|
-
'color-introduce-border': '#555',
|
|
239
|
-
'color-primary': '#96cbfe',
|
|
240
|
-
'color-link': '#A8FFC4',
|
|
241
|
-
'color-type': '#A8FFC4',
|
|
242
|
-
'color-progress': '#5580f8',
|
|
243
|
-
'color-progress-track': 'transparent',
|
|
244
|
-
'color-side-bar': '#4a7afe',
|
|
245
|
-
'color-side-bar-active-background': '#4a7afe1a',
|
|
246
|
-
'color-app-bar': '#272727',
|
|
247
|
-
'color-nav-button-hover-background': 'rgba(255, 255, 255, 0.08)',
|
|
248
|
-
'color-mobile-cell-hover': '#4a7afe',
|
|
249
|
-
'color-pc-language-active': '#4a7afe',
|
|
250
|
-
'color-pc-language-active-background': '#4a7afe20',
|
|
251
|
-
'color-pc-github-active-background': '#303030',
|
|
252
|
-
'color-mobile-language-active': '#4a7afe',
|
|
253
|
-
'color-mobile-language-active-background': '#4a7afe20',
|
|
254
|
-
'color-hl-background': '#272727',
|
|
255
|
-
'color-hl-code': '#fff',
|
|
256
|
-
'color-hl-border': '#272727',
|
|
257
|
-
'color-hl-group-a': '#7c7c7c',
|
|
258
|
-
'color-hl-group-b': '#96cbfe',
|
|
259
|
-
'color-hl-group-c': '#ff7b1e',
|
|
260
|
-
'color-hl-group-d': '#A8FFC4',
|
|
261
|
-
'color-hl-group-e': '#ff7b1e',
|
|
262
|
-
'color-hl-group-f': '#ff7b1e',
|
|
263
|
-
'color-hl-group-g': '#ff7b1e',
|
|
264
|
-
'color-hl-group-h': '#14a6e9',
|
|
265
|
-
'color-hl-group-i': '#ed4648',
|
|
266
|
-
},
|
|
267
|
-
}
|