@varlet/cli 2.0.6 → 2.1.0-alpha.1667210582672
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} +0 -0
- package/lib/node/bin.js +122 -0
- package/lib/{commands → node/commands}/build.d.ts +0 -0
- package/lib/node/commands/build.js +15 -0
- package/lib/{commands → node/commands}/changelog.d.ts +0 -0
- package/lib/node/commands/changelog.js +20 -0
- package/lib/{commands → node/commands}/commitLint.d.ts +0 -0
- package/lib/node/commands/commitLint.js +45 -0
- package/lib/{commands → node/commands}/compile.d.ts +0 -0
- package/lib/node/commands/compile.js +35 -0
- package/lib/{commands → node/commands}/create.d.ts +0 -0
- package/lib/node/commands/create.js +91 -0
- package/lib/{commands → node/commands}/dev.d.ts +0 -0
- package/lib/node/commands/dev.js +38 -0
- package/lib/{commands → node/commands}/gen.d.ts +0 -0
- package/lib/node/commands/gen.js +75 -0
- package/lib/{commands → node/commands}/jest.d.ts +0 -0
- package/lib/node/commands/jest.js +27 -0
- package/lib/{commands → node/commands}/lint.d.ts +0 -0
- package/lib/node/commands/lint.js +42 -0
- package/lib/{commands → node/commands}/preview.d.ts +0 -0
- package/lib/node/commands/preview.js +18 -0
- package/lib/{commands → node/commands}/release.d.ts +0 -0
- package/lib/node/commands/release.js +146 -0
- package/lib/{commands → node/commands}/vite.d.ts +0 -0
- package/lib/node/commands/vite.js +13 -0
- package/lib/{compiler → node/compiler}/compileModule.d.ts +0 -0
- package/lib/node/compiler/compileModule.js +74 -0
- package/lib/{compiler → node/compiler}/compileSFC.d.ts +0 -0
- package/lib/node/compiler/compileSFC.js +79 -0
- package/lib/{compiler → node/compiler}/compileScript.d.ts +1 -1
- package/lib/node/compiler/compileScript.js +141 -0
- package/lib/{compiler → node/compiler}/compileSiteEntry.d.ts +0 -0
- package/lib/node/compiler/compileSiteEntry.js +128 -0
- package/lib/{compiler → node/compiler}/compileStyle.d.ts +0 -0
- package/lib/node/compiler/compileStyle.js +39 -0
- package/lib/{compiler → node/compiler}/compileTemplateHighlight.d.ts +0 -0
- package/lib/node/compiler/compileTemplateHighlight.js +133 -0
- package/lib/{compiler → node/compiler}/compileTypes.d.ts +0 -0
- package/lib/node/compiler/compileTypes.js +45 -0
- package/lib/{config → node/config}/varlet.config.d.ts +5 -4
- 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 +1 -2
- package/lib/node/shared/constant.js +47 -0
- package/lib/{shared → node/shared}/fsUtils.d.ts +1 -0
- package/lib/node/shared/fsUtils.js +48 -0
- package/lib/{shared → node/shared}/logger.d.ts +0 -0
- package/lib/node/shared/logger.js +18 -0
- package/package.json +22 -20
- package/{preset.js → preset.cjs} +1 -1
- package/site/components/code-example/CodeExample.vue +2 -1
- package/site/components/utils/components.ts +1 -4
- package/site/components/utils/elements.ts +1 -1
- package/site/mobile/App.vue +27 -26
- package/site/mobile/components/AppHome.vue +2 -1
- package/site/pc/App.vue +2 -1
- package/site/pc/Layout.vue +4 -3
- package/site/pc/components/AppHeader.vue +4 -2
- package/site/pc/pages/index/index.vue +8 -4
- package/site/useProgress.ts +2 -1
- package/site/utils.ts +6 -137
- package/template/create/index.ts.ejs +1 -1
- 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 -305
- 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
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import slash from 'slash';
|
|
2
|
+
import fse from 'fs-extra';
|
|
3
|
+
import { DOCS_DIR_NAME, DIR_INDEX, EXAMPLE_DIR_NAME, LOCALE_DIR_NAME, ROOT_DOCS_DIR, ROOT_PAGES_DIR, SITE, SITE_DIR, SITE_MOBILE_ROUTES, SITE_PC_DIR, SITE_PC_ROUTES, SRC_DIR, } from '../shared/constant.js';
|
|
4
|
+
import { glob, isDir, outputFileSyncOnChange } from '../shared/fsUtils.js';
|
|
5
|
+
import { getVarletConfig } from '../config/varlet.config.js';
|
|
6
|
+
import { get } from 'lodash-es';
|
|
7
|
+
const { copy } = fse;
|
|
8
|
+
const EXAMPLE_COMPONENT_NAME_RE = /\/([-\w]+)\/example\/index.vue/;
|
|
9
|
+
const COMPONENT_DOCS_RE = /\/([-\w]+)\/docs\/([-\w]+)\.md/;
|
|
10
|
+
const ROOT_DOCS_RE = /\/docs\/([-\w]+)\.([-\w]+)\.md/;
|
|
11
|
+
const ROOT_LOCALE_RE = /\/pages\/([-\w]+)\/locale\/([-\w]+)\.ts/;
|
|
12
|
+
export function getExampleRoutePath(examplePath) {
|
|
13
|
+
var _a;
|
|
14
|
+
return '/' + ((_a = examplePath.match(EXAMPLE_COMPONENT_NAME_RE)) === null || _a === void 0 ? void 0 : _a[1]);
|
|
15
|
+
}
|
|
16
|
+
export function getComponentDocRoutePath(componentDocsPath) {
|
|
17
|
+
var _a;
|
|
18
|
+
const [, routePath, language] = (_a = componentDocsPath.match(COMPONENT_DOCS_RE)) !== null && _a !== void 0 ? _a : [];
|
|
19
|
+
return `/${language}/${routePath}`;
|
|
20
|
+
}
|
|
21
|
+
export function getRootDocRoutePath(rootDocsPath) {
|
|
22
|
+
var _a;
|
|
23
|
+
const [, routePath, language] = (_a = rootDocsPath.match(ROOT_DOCS_RE)) !== null && _a !== void 0 ? _a : [];
|
|
24
|
+
return `/${language}/${routePath}`;
|
|
25
|
+
}
|
|
26
|
+
export function getRootRoutePath(rootLocalePath) {
|
|
27
|
+
var _a;
|
|
28
|
+
const [, routePath, language] = (_a = rootLocalePath.match(ROOT_LOCALE_RE)) !== null && _a !== void 0 ? _a : [];
|
|
29
|
+
return `/${language}/${routePath}`;
|
|
30
|
+
}
|
|
31
|
+
export function getRootFilePath(rootLocalePath) {
|
|
32
|
+
return rootLocalePath.replace(/locale\/.+/, DIR_INDEX);
|
|
33
|
+
}
|
|
34
|
+
export function findExamples() {
|
|
35
|
+
return glob(`${SRC_DIR}/**/${EXAMPLE_DIR_NAME}/${DIR_INDEX}`);
|
|
36
|
+
}
|
|
37
|
+
export function findComponentDocs() {
|
|
38
|
+
return glob(`${SRC_DIR}/**/${DOCS_DIR_NAME}/*.md`);
|
|
39
|
+
}
|
|
40
|
+
export function findRootDocs() {
|
|
41
|
+
return glob(`${ROOT_DOCS_DIR}/*.md`);
|
|
42
|
+
}
|
|
43
|
+
export async function findRootLocales() {
|
|
44
|
+
const defaultLanguage = get(await getVarletConfig(), 'defaultLanguage');
|
|
45
|
+
const userPages = await glob(`${ROOT_PAGES_DIR}/*`);
|
|
46
|
+
const baseLocales = await glob(`${SITE}/pc/pages/**/${LOCALE_DIR_NAME}/*.ts`);
|
|
47
|
+
const userLocales = await userPages.reduce(async (userLocales, page) => {
|
|
48
|
+
if (isDir(page)) {
|
|
49
|
+
const locales = await glob(`${page}/${LOCALE_DIR_NAME}/*.ts`);
|
|
50
|
+
if (!locales.length)
|
|
51
|
+
locales.push(`${page}/${LOCALE_DIR_NAME}/${defaultLanguage}.ts`);
|
|
52
|
+
(await userLocales).push(...locales);
|
|
53
|
+
}
|
|
54
|
+
return userLocales;
|
|
55
|
+
}, Promise.resolve([]));
|
|
56
|
+
// filter
|
|
57
|
+
const filterMap = new Map();
|
|
58
|
+
baseLocales.forEach((locale) => {
|
|
59
|
+
var _a;
|
|
60
|
+
const [, routePath, language] = (_a = locale.match(ROOT_LOCALE_RE)) !== null && _a !== void 0 ? _a : [];
|
|
61
|
+
filterMap.set(routePath + language, slash(`${SITE_PC_DIR}/pages/${routePath}/locale/${language}.ts`));
|
|
62
|
+
});
|
|
63
|
+
userLocales.forEach((locale) => {
|
|
64
|
+
var _a;
|
|
65
|
+
const [, routePath, language] = (_a = locale.match(ROOT_LOCALE_RE)) !== null && _a !== void 0 ? _a : [];
|
|
66
|
+
filterMap.set(routePath + language, locale);
|
|
67
|
+
});
|
|
68
|
+
return Promise.resolve(Array.from(filterMap.values()));
|
|
69
|
+
}
|
|
70
|
+
export async function buildMobileSiteRoutes() {
|
|
71
|
+
const examples = await findExamples();
|
|
72
|
+
const routes = examples.map((example) => `
|
|
73
|
+
{
|
|
74
|
+
path: '${getExampleRoutePath(example)}',
|
|
75
|
+
// @ts-ignore
|
|
76
|
+
component: () => import('${example}')
|
|
77
|
+
}`);
|
|
78
|
+
const source = `export default [\
|
|
79
|
+
${routes.join(',')}
|
|
80
|
+
]`;
|
|
81
|
+
await outputFileSyncOnChange(SITE_MOBILE_ROUTES, source);
|
|
82
|
+
}
|
|
83
|
+
export async function buildPcSiteRoutes() {
|
|
84
|
+
const [componentDocs, rootDocs, rootLocales] = await Promise.all([
|
|
85
|
+
findComponentDocs(),
|
|
86
|
+
findRootDocs(),
|
|
87
|
+
findRootLocales(),
|
|
88
|
+
]);
|
|
89
|
+
const rootPagesRoutes = rootLocales.map((rootLocale) => `
|
|
90
|
+
{
|
|
91
|
+
path: '${getRootRoutePath(rootLocale)}',
|
|
92
|
+
// @ts-ignore
|
|
93
|
+
component: () => import('${getRootFilePath(rootLocale)}')
|
|
94
|
+
}\
|
|
95
|
+
`);
|
|
96
|
+
const componentDocsRoutes = componentDocs.map((componentDoc) => `
|
|
97
|
+
{
|
|
98
|
+
path: '${getComponentDocRoutePath(componentDoc)}',
|
|
99
|
+
// @ts-ignore
|
|
100
|
+
component: () => import('${componentDoc}')
|
|
101
|
+
}`);
|
|
102
|
+
const rootDocsRoutes = rootDocs.map((rootDoc) => `
|
|
103
|
+
{
|
|
104
|
+
path: '${getRootDocRoutePath(rootDoc)}',
|
|
105
|
+
// @ts-ignore
|
|
106
|
+
component: () => import('${rootDoc}')
|
|
107
|
+
}`);
|
|
108
|
+
const layoutRoutes = `{
|
|
109
|
+
path: '/layout',
|
|
110
|
+
// @ts-ignore
|
|
111
|
+
component:()=> import('${slash(SITE_PC_DIR)}/Layout.vue'),
|
|
112
|
+
children: [
|
|
113
|
+
${[...componentDocsRoutes, rootDocsRoutes].join(',')},
|
|
114
|
+
]
|
|
115
|
+
}`;
|
|
116
|
+
const source = `export default [\
|
|
117
|
+
${rootPagesRoutes.join(',')},
|
|
118
|
+
${layoutRoutes}
|
|
119
|
+
]`;
|
|
120
|
+
outputFileSyncOnChange(SITE_PC_ROUTES, source);
|
|
121
|
+
}
|
|
122
|
+
export async function buildSiteSource() {
|
|
123
|
+
return copy(SITE, SITE_DIR);
|
|
124
|
+
}
|
|
125
|
+
export async function buildSiteEntry() {
|
|
126
|
+
await getVarletConfig(true);
|
|
127
|
+
await Promise.all([buildMobileSiteRoutes(), buildPcSiteRoutes(), buildSiteSource()]);
|
|
128
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import fse from 'fs-extra';
|
|
2
|
+
import less from 'less';
|
|
3
|
+
import { replaceExt, smartAppendFileSync } from '../shared/fsUtils.js';
|
|
4
|
+
import { parse, resolve } from 'path';
|
|
5
|
+
const { render } = less;
|
|
6
|
+
const { readFileSync, removeSync, writeFileSync } = fse;
|
|
7
|
+
export const EMPTY_SPACE_RE = /[\s]+/g;
|
|
8
|
+
export const EMPTY_LINE_RE = /[\n\r]*/g;
|
|
9
|
+
export const IMPORT_CSS_RE = /(?<!['"`])import\s+['"](\.{1,2}\/.+\.css)['"]\s*;?(?!\s*['"`])/g;
|
|
10
|
+
export const IMPORT_LESS_RE = /(?<!['"`])import\s+['"](\.{1,2}\/.+\.less)['"]\s*;?(?!\s*['"`])/g;
|
|
11
|
+
export const REQUIRE_CSS_RE = /(?<!['"`])require\(\s*['"](\.{1,2}\/.+\.css)['"]\s*\);?(?!\s*['"`])/g;
|
|
12
|
+
export const REQUIRE_LESS_RE = /(?<!['"`])require\(\s*['"](\.{1,2}\/.+\.less)['"]\s*\);?(?!\s*['"`])/g;
|
|
13
|
+
export const STYLE_IMPORT_RE = /@import\s+['"](.+)['"]\s*;/g;
|
|
14
|
+
export const clearEmptyLine = (s) => s.replace(EMPTY_LINE_RE, '').replace(EMPTY_SPACE_RE, ' ');
|
|
15
|
+
export function normalizeStyleDependency(styleImport, reg) {
|
|
16
|
+
let relativePath = styleImport.replace(reg, '$1');
|
|
17
|
+
relativePath = relativePath.replace(/(\.less)|(\.css)/, '');
|
|
18
|
+
if (relativePath.startsWith('./')) {
|
|
19
|
+
return '.' + relativePath;
|
|
20
|
+
}
|
|
21
|
+
return '../' + relativePath;
|
|
22
|
+
}
|
|
23
|
+
export function extractStyleDependencies(file, code, styleReg) {
|
|
24
|
+
var _a;
|
|
25
|
+
const styleImports = (_a = code.match(styleReg)) !== null && _a !== void 0 ? _a : [];
|
|
26
|
+
const cssFile = resolve(parse(file).dir, './style/index.js');
|
|
27
|
+
const modules = process.env.BABEL_MODULE;
|
|
28
|
+
styleImports.forEach((styleImport) => {
|
|
29
|
+
const normalizedPath = normalizeStyleDependency(styleImport, styleReg);
|
|
30
|
+
smartAppendFileSync(cssFile, modules === 'commonjs' ? `require('${normalizedPath}.css')\n` : `import '${normalizedPath}.css'\n`);
|
|
31
|
+
});
|
|
32
|
+
return code.replace(styleReg, '');
|
|
33
|
+
}
|
|
34
|
+
export async function compileLess(file) {
|
|
35
|
+
const source = readFileSync(file, 'utf-8');
|
|
36
|
+
const { css } = await render(source, { filename: file });
|
|
37
|
+
removeSync(file);
|
|
38
|
+
writeFileSync(replaceExt(file, '.css'), clearEmptyLine(css), 'utf-8');
|
|
39
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import fse from 'fs-extra';
|
|
2
|
+
import { SRC_DIR, HL_MD, HL_API_RE, HL_COMPONENT_NAME_RE, HL_TITLE_ATTRIBUTES_RE, HL_TITLE_EVENTS_RE, HL_TITLE_SLOTS_RE, HL_WEB_TYPES_JSON, HL_DIR, HL_TAGS_JSON, HL_ATTRIBUTES_JSON, CLI_PACKAGE_JSON, } from '../shared/constant.js';
|
|
3
|
+
import { resolve } from 'path';
|
|
4
|
+
import { isDir, isMD } from '../shared/fsUtils.js';
|
|
5
|
+
import { get } from 'lodash-es';
|
|
6
|
+
import { getVarletConfig } from '../config/varlet.config.js';
|
|
7
|
+
const { ensureDir, readdirSync, readFileSync, readJSONSync, writeFile } = fse;
|
|
8
|
+
const TABLE_HEAD_RE = /\s*\|.*\|\s*\n\s*\|.*---+\s*\|\s*\n+/;
|
|
9
|
+
const TABLE_FOOT_RE = /(\|\s*$)|(\|\s*\n(?!\s*\|))/;
|
|
10
|
+
export const replaceDot = (s) => s.replace(/`/g, '');
|
|
11
|
+
export const replaceUnderline = (s) => s.replace(/_/g, '');
|
|
12
|
+
export function parseTable(table) {
|
|
13
|
+
const rows = table.split('\n').filter(Boolean);
|
|
14
|
+
return rows.map((row) => {
|
|
15
|
+
const cols = row.split('|');
|
|
16
|
+
cols.shift();
|
|
17
|
+
cols.pop();
|
|
18
|
+
return cols.map((col) => col.replace(/__varlet_axis__/g, '|').trim());
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
export function compileTable(md, titleRe) {
|
|
22
|
+
const apiMatched = md.match(HL_API_RE);
|
|
23
|
+
if (!apiMatched) {
|
|
24
|
+
return '';
|
|
25
|
+
}
|
|
26
|
+
md = md.slice(apiMatched.index + apiMatched[0].length);
|
|
27
|
+
const titleMatched = md.match(titleRe);
|
|
28
|
+
if (!titleMatched) {
|
|
29
|
+
return '';
|
|
30
|
+
}
|
|
31
|
+
md = md.slice(titleMatched.index + titleMatched[0].length);
|
|
32
|
+
const tableHeadMatched = md.match(TABLE_HEAD_RE);
|
|
33
|
+
if (!tableHeadMatched) {
|
|
34
|
+
return '';
|
|
35
|
+
}
|
|
36
|
+
md = md.slice(tableHeadMatched.index + tableHeadMatched[0].length);
|
|
37
|
+
const tableFootMatched = md.match(TABLE_FOOT_RE);
|
|
38
|
+
if (!tableFootMatched) {
|
|
39
|
+
return '';
|
|
40
|
+
}
|
|
41
|
+
md = md.slice(0, tableFootMatched.index + tableFootMatched[0].length);
|
|
42
|
+
return md.replace(/\\\|/g, '__varlet_axis__').trim();
|
|
43
|
+
}
|
|
44
|
+
export function compileTags(table, tags, componentName, varletConfig) {
|
|
45
|
+
tags[`${get(varletConfig, 'namespace')}-${componentName}`] = {
|
|
46
|
+
attributes: table.attributesTable.map((row) => replaceDot(row[0])),
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export function compileAttributes(table, attributes, componentName, varletConfig) {
|
|
50
|
+
table.attributesTable.forEach((row) => {
|
|
51
|
+
const attrNamespace = `${get(varletConfig, 'namespace')}-${componentName}/${replaceDot(row[0])}`;
|
|
52
|
+
attributes[attrNamespace] = {
|
|
53
|
+
type: replaceUnderline(row[2]),
|
|
54
|
+
description: `${row[1]} 默认值:${replaceDot(row[3])}`,
|
|
55
|
+
};
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
export function compileWebTypes(table, webTypes, componentName, varletConfig) {
|
|
59
|
+
const { attributesTable, eventsTable, slotsTable } = table;
|
|
60
|
+
const attributes = attributesTable.map((row) => ({
|
|
61
|
+
name: replaceDot(row[0]),
|
|
62
|
+
description: row[1],
|
|
63
|
+
default: replaceDot(row[3]),
|
|
64
|
+
value: {
|
|
65
|
+
type: replaceUnderline(row[2]),
|
|
66
|
+
kind: 'expression',
|
|
67
|
+
},
|
|
68
|
+
}));
|
|
69
|
+
const events = eventsTable.map((row) => ({
|
|
70
|
+
name: replaceDot(row[0]),
|
|
71
|
+
description: row[1],
|
|
72
|
+
}));
|
|
73
|
+
const slots = slotsTable.map((row) => ({
|
|
74
|
+
name: replaceDot(row[0]),
|
|
75
|
+
description: row[1],
|
|
76
|
+
}));
|
|
77
|
+
webTypes.contributions.html.tags.push({
|
|
78
|
+
name: `${get(varletConfig, 'namespace')}-${componentName}`,
|
|
79
|
+
attributes,
|
|
80
|
+
events,
|
|
81
|
+
slots,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
export function compileMD(path, tags, attributes, webTypes, varletConfig) {
|
|
85
|
+
if (!path.endsWith(HL_MD)) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
const md = readFileSync(path, 'utf-8');
|
|
89
|
+
const componentName = path.match(HL_COMPONENT_NAME_RE)[2];
|
|
90
|
+
const attributesTable = parseTable(compileTable(md, HL_TITLE_ATTRIBUTES_RE));
|
|
91
|
+
const eventsTable = parseTable(compileTable(md, HL_TITLE_EVENTS_RE));
|
|
92
|
+
const slotsTable = parseTable(compileTable(md, HL_TITLE_SLOTS_RE));
|
|
93
|
+
const table = {
|
|
94
|
+
attributesTable,
|
|
95
|
+
eventsTable,
|
|
96
|
+
slotsTable,
|
|
97
|
+
};
|
|
98
|
+
compileWebTypes(table, webTypes, componentName, varletConfig);
|
|
99
|
+
compileTags(table, tags, componentName, varletConfig);
|
|
100
|
+
compileAttributes(table, attributes, componentName, varletConfig);
|
|
101
|
+
}
|
|
102
|
+
export function compileDir(path, tags, attributes, webTypes, varletConfig) {
|
|
103
|
+
const dir = readdirSync(path);
|
|
104
|
+
dir.forEach((filename) => {
|
|
105
|
+
const filePath = resolve(path, filename);
|
|
106
|
+
isDir(filePath) && compileDir(filePath, tags, attributes, webTypes, varletConfig);
|
|
107
|
+
isMD(filePath) && compileMD(filePath, tags, attributes, webTypes, varletConfig);
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
export async function compileTemplateHighlight() {
|
|
111
|
+
await ensureDir(HL_DIR);
|
|
112
|
+
const varletConfig = await getVarletConfig();
|
|
113
|
+
const tags = {};
|
|
114
|
+
const attributes = {};
|
|
115
|
+
const webTypes = {
|
|
116
|
+
$schema: 'https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json',
|
|
117
|
+
framework: 'vue',
|
|
118
|
+
version: readJSONSync(CLI_PACKAGE_JSON).version,
|
|
119
|
+
name: get(varletConfig, 'title'),
|
|
120
|
+
contributions: {
|
|
121
|
+
html: {
|
|
122
|
+
tags: [],
|
|
123
|
+
'types-syntax': 'typescript',
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
};
|
|
127
|
+
compileDir(SRC_DIR, tags, attributes, webTypes, varletConfig);
|
|
128
|
+
await Promise.all([
|
|
129
|
+
writeFile(HL_WEB_TYPES_JSON, JSON.stringify(webTypes, null, 2)),
|
|
130
|
+
writeFile(HL_TAGS_JSON, JSON.stringify(tags, null, 2)),
|
|
131
|
+
writeFile(HL_ATTRIBUTES_JSON, JSON.stringify(attributes, null, 2)),
|
|
132
|
+
]);
|
|
133
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import fse from 'fs-extra';
|
|
2
|
+
import { TYPES_DIR, UI_PACKAGE_JSON } from '../shared/constant.js';
|
|
3
|
+
import { bigCamelize } from '@varlet/shared';
|
|
4
|
+
import { resolve, relative } from 'path';
|
|
5
|
+
import { getVarletConfig } from '../config/varlet.config.js';
|
|
6
|
+
import { get } from 'lodash-es';
|
|
7
|
+
const { ensureDir, writeFileSync, readdir, writeFile, readJSONSync } = fse;
|
|
8
|
+
export function generateReference(moduleDir) {
|
|
9
|
+
writeFileSync(resolve(moduleDir, 'index.d.ts'), `\
|
|
10
|
+
export * from '${relative(moduleDir, TYPES_DIR)}'
|
|
11
|
+
`);
|
|
12
|
+
}
|
|
13
|
+
export async function compileTypes() {
|
|
14
|
+
const varletConfig = await getVarletConfig();
|
|
15
|
+
const namespace = get(varletConfig, 'namespace');
|
|
16
|
+
const { name } = readJSONSync(UI_PACKAGE_JSON);
|
|
17
|
+
await ensureDir(TYPES_DIR);
|
|
18
|
+
const dir = await readdir(TYPES_DIR);
|
|
19
|
+
const ignoreEntryDir = dir.filter((filename) => filename !== 'index.d.ts' && filename !== 'global.d.ts');
|
|
20
|
+
const exports = [];
|
|
21
|
+
const declares = [];
|
|
22
|
+
ignoreEntryDir.forEach((filename) => {
|
|
23
|
+
const componentName = filename.slice(0, filename.indexOf('.d.ts'));
|
|
24
|
+
exports.push(`export * from './${componentName}'`);
|
|
25
|
+
if (!componentName.startsWith(namespace)) {
|
|
26
|
+
declares.push(`${bigCamelize(namespace)}${bigCamelize(componentName)}: typeof import('${name}')['_${bigCamelize(componentName)}Component']`);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
const globalDeclares = `\
|
|
30
|
+
declare module 'vue' {
|
|
31
|
+
export interface GlobalComponents {
|
|
32
|
+
${declares.join('\n ')}
|
|
33
|
+
}
|
|
34
|
+
}`;
|
|
35
|
+
const template = `\
|
|
36
|
+
import type { App } from 'vue'
|
|
37
|
+
|
|
38
|
+
export const install: (app: App) => void
|
|
39
|
+
|
|
40
|
+
${exports.join('\n')}
|
|
41
|
+
|
|
42
|
+
${globalDeclares}
|
|
43
|
+
`;
|
|
44
|
+
await Promise.all([writeFile(resolve(TYPES_DIR, 'index.d.ts'), template)]);
|
|
45
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface VarletConfig {
|
|
1
|
+
export interface VarletConfig {
|
|
2
2
|
/**
|
|
3
3
|
* @default `Varlet`
|
|
4
4
|
* UI library name.
|
|
@@ -19,7 +19,9 @@ interface VarletConfig {
|
|
|
19
19
|
* Local dev server port
|
|
20
20
|
*/
|
|
21
21
|
port?: number;
|
|
22
|
+
title?: string;
|
|
22
23
|
logo?: string;
|
|
24
|
+
themeKey?: string;
|
|
23
25
|
defaultLanguage?: 'zh-CN' | 'en-US';
|
|
24
26
|
/**
|
|
25
27
|
* @default `false`
|
|
@@ -38,7 +40,6 @@ interface VarletConfig {
|
|
|
38
40
|
mobile?: Record<string, any>;
|
|
39
41
|
moduleCompatible?: Record<string, string>;
|
|
40
42
|
}
|
|
41
|
-
export declare function defineConfig(
|
|
43
|
+
export declare function defineConfig(config: VarletConfig): VarletConfig;
|
|
42
44
|
export declare function mergeStrategy(value: any, srcValue: any, key: string): any[] | undefined;
|
|
43
|
-
export declare function getVarletConfig(emit?: boolean):
|
|
44
|
-
export {};
|
|
45
|
+
export declare function getVarletConfig(emit?: boolean): Promise<Required<VarletConfig>>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import fse from 'fs-extra';
|
|
2
|
+
import { mergeWith } from 'lodash-es';
|
|
3
|
+
import { VARLET_CONFIG, SITE_CONFIG } from '../shared/constant.js';
|
|
4
|
+
import { outputFileSyncOnChange } from '../shared/fsUtils.js';
|
|
5
|
+
import { isArray } from '@varlet/shared';
|
|
6
|
+
import { pathToFileURL } from 'url';
|
|
7
|
+
const { pathExistsSync, statSync } = fse;
|
|
8
|
+
export function defineConfig(config) {
|
|
9
|
+
return config;
|
|
10
|
+
}
|
|
11
|
+
export function mergeStrategy(value, srcValue, key) {
|
|
12
|
+
if (key === 'features' && isArray(srcValue)) {
|
|
13
|
+
return srcValue;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export async function getVarletConfig(emit = false) {
|
|
17
|
+
const defaultConfig = (await import('./varlet.default.config.js')).default;
|
|
18
|
+
const config = pathExistsSync(VARLET_CONFIG)
|
|
19
|
+
? (await import(`${pathToFileURL(VARLET_CONFIG).href}?_t=${statSync(VARLET_CONFIG).mtimeMs}`)).default
|
|
20
|
+
: {};
|
|
21
|
+
const mergedConfig = mergeWith(defaultConfig, config, mergeStrategy);
|
|
22
|
+
if (emit) {
|
|
23
|
+
const source = JSON.stringify(mergedConfig, null, 2);
|
|
24
|
+
outputFileSyncOnChange(SITE_CONFIG, source);
|
|
25
|
+
}
|
|
26
|
+
return mergedConfig;
|
|
27
|
+
}
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import { defineConfig } from './varlet.config.js';
|
|
2
|
+
export default defineConfig({
|
|
3
|
+
name: 'Varlet',
|
|
4
|
+
namespace: 'var',
|
|
5
|
+
host: 'localhost',
|
|
6
|
+
port: 8080,
|
|
7
|
+
title: 'VARLET',
|
|
8
|
+
logo: 'https://varlet.gitee.io/varlet-ui/varlet_icon.png',
|
|
9
|
+
defaultLanguage: 'zh-CN',
|
|
10
|
+
highlight: {
|
|
11
|
+
/**
|
|
12
|
+
* @see https://highlightjs.org/
|
|
13
|
+
*/
|
|
14
|
+
style: '//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.3.2/styles/nord.min.css',
|
|
15
|
+
},
|
|
16
|
+
analysis: {
|
|
17
|
+
baidu: '',
|
|
18
|
+
},
|
|
19
|
+
useMobile: false,
|
|
20
|
+
pc: {
|
|
21
|
+
menu: [],
|
|
22
|
+
redirect: '/index',
|
|
23
|
+
indexPage: {
|
|
24
|
+
description: {
|
|
25
|
+
'zh-CN': 'Varlet 是一个基于 Vue3 开发的 Material 风格移动端组件库,全面拥抱 Vue3 生态,由社区团队维护。支持 Typescript、按需引入、暗黑模式、主题定制、国际化,并提供 VSCode 插件保障良好的开发体验',
|
|
26
|
+
'en-US': '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',
|
|
27
|
+
},
|
|
28
|
+
started: {
|
|
29
|
+
'zh-CN': '起步',
|
|
30
|
+
'en-US': 'GET STARTED',
|
|
31
|
+
},
|
|
32
|
+
features: [
|
|
33
|
+
{
|
|
34
|
+
name: {
|
|
35
|
+
'zh-CN': '组件丰富',
|
|
36
|
+
'en-US': 'Rich components',
|
|
37
|
+
},
|
|
38
|
+
description: {
|
|
39
|
+
'zh-CN': '提供 50 个高质量通用组件',
|
|
40
|
+
'en-US': 'Provide 50 high quality general purpose components',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: {
|
|
45
|
+
'zh-CN': '按需引入',
|
|
46
|
+
'en-US': 'On-Demand',
|
|
47
|
+
},
|
|
48
|
+
description: {
|
|
49
|
+
'zh-CN': '每一个组件都可单独引入,并有着良好的 tree-shaking 优化',
|
|
50
|
+
'en-US': 'Each component can be imported separately and has good tree-shaking optimization',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: {
|
|
55
|
+
'zh-CN': '主题定制',
|
|
56
|
+
'en-US': 'Theme customization',
|
|
57
|
+
},
|
|
58
|
+
description: {
|
|
59
|
+
'zh-CN': '内置亮色和暗色两种主题,支持组件的样式自定义',
|
|
60
|
+
'en-US': 'Built-in light and dark themes, support style customization of components',
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: {
|
|
65
|
+
'zh-CN': '国际化',
|
|
66
|
+
'en-US': 'Locale',
|
|
67
|
+
},
|
|
68
|
+
description: {
|
|
69
|
+
'zh-CN': '内置国际化 API,内置中文和英文的语言包',
|
|
70
|
+
'en-US': 'Built-in i18n API, which supports both Chinese and English languages by default',
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: {
|
|
75
|
+
'zh-CN': '支持 Typescript',
|
|
76
|
+
'en-US': 'Support typescript',
|
|
77
|
+
},
|
|
78
|
+
description: {
|
|
79
|
+
'zh-CN': '使用 Typescript 构建,提供良好的组件类型系统',
|
|
80
|
+
'en-US': 'Built with typescript, which provides a nice components type system',
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: {
|
|
85
|
+
'zh-CN': '服务端渲染',
|
|
86
|
+
'en-US': 'Server-side rendering',
|
|
87
|
+
},
|
|
88
|
+
description: {
|
|
89
|
+
'zh-CN': '对服务端渲染支持良好,并对 Nuxt 进行了适配',
|
|
90
|
+
'en-US': 'Good support for server-side rendering and adaptation to Nuxt',
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: {
|
|
95
|
+
'zh-CN': '国人开发',
|
|
96
|
+
'en-US': 'Developed by Chinese',
|
|
97
|
+
},
|
|
98
|
+
description: {
|
|
99
|
+
'zh-CN': '由国人开发,完善的中英文文档和后勤保障',
|
|
100
|
+
'en-US': 'Complete Chinese and English documentation and logistics support',
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: {
|
|
105
|
+
'zh-CN': 'IDE 支持',
|
|
106
|
+
'en-US': 'IDE Code Support',
|
|
107
|
+
},
|
|
108
|
+
description: {
|
|
109
|
+
'zh-CN': '支持在 webstorm,vscode 中的组件语法高亮, 并提供 vscode 插件为开发提升效率',
|
|
110
|
+
'en-US': 'Supports to highlight the component syntax for webstorm and vscode, and provides a separate helper plugin for vscode',
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
name: {
|
|
115
|
+
'zh-CN': '组件库快速成型工具',
|
|
116
|
+
'en-US': 'Component library toolchain',
|
|
117
|
+
},
|
|
118
|
+
description: {
|
|
119
|
+
'zh-CN': '开源了搭建本组件库的所有工具链,提供快速开发组件库的能力',
|
|
120
|
+
'en-US': 'Open-sourced the toolchain for building this component library, providing the ability to rapidly develop the component library',
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
],
|
|
124
|
+
contributors: {
|
|
125
|
+
label: {
|
|
126
|
+
'zh-CN': '贡献者',
|
|
127
|
+
'en-US': 'Contributors',
|
|
128
|
+
},
|
|
129
|
+
link: 'https://github.com/varletjs/varlet/graphs/contributors',
|
|
130
|
+
image: 'https://contrib.rocks/image?repo=varletjs/varlet',
|
|
131
|
+
},
|
|
132
|
+
license: {
|
|
133
|
+
'zh-CN': '组件库基于 MIT 协议,您可以自由的使用和分享',
|
|
134
|
+
'en-US': 'Released under the MIT License, You can use and share freely.',
|
|
135
|
+
},
|
|
136
|
+
copyright: {
|
|
137
|
+
'zh-CN': 'Copyright © 2022 varletjs 组织成员以及 varlet 的贡献者们',
|
|
138
|
+
'en-US': 'Copyright © 2022 varletjs member and varlet contributors.',
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
title: {
|
|
142
|
+
'zh-CN': '面向 Vue3 的 Material 风格移动端组件库',
|
|
143
|
+
'en-US': 'Material design mobile components built for Vue3',
|
|
144
|
+
},
|
|
145
|
+
header: {
|
|
146
|
+
i18n: {
|
|
147
|
+
'zh-CN': '中文',
|
|
148
|
+
'en-US': 'English',
|
|
149
|
+
},
|
|
150
|
+
versions: null,
|
|
151
|
+
github: 'https://github.com/varletjs/varlet',
|
|
152
|
+
playground: 'https://varlet.gitee.io/varlet-ui-playground',
|
|
153
|
+
darkMode: true,
|
|
154
|
+
},
|
|
155
|
+
clipboard: {
|
|
156
|
+
'zh-CN': '代码已复制到剪切板',
|
|
157
|
+
'en-US': 'The code has been copied to the clipboard',
|
|
158
|
+
},
|
|
159
|
+
fold: {
|
|
160
|
+
defaultFold: false,
|
|
161
|
+
foldHeight: 50,
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
mobile: {
|
|
165
|
+
redirect: '/home',
|
|
166
|
+
title: {
|
|
167
|
+
'zh-CN': '面向 Vue3 的 Material 风格移动端组件库',
|
|
168
|
+
'en-US': 'Material design mobile components built for Vue3',
|
|
169
|
+
},
|
|
170
|
+
header: {
|
|
171
|
+
i18n: {
|
|
172
|
+
'zh-CN': '中文',
|
|
173
|
+
'en-US': 'English',
|
|
174
|
+
},
|
|
175
|
+
github: 'https://github.com/varletjs/varlet',
|
|
176
|
+
darkMode: true,
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
themeKey: 'VARLET_THEME',
|
|
180
|
+
lightTheme: {
|
|
181
|
+
'color-body': '#fff',
|
|
182
|
+
'color-index-page-background': '#f2f2f2',
|
|
183
|
+
'color-index-page-feature-background': '#fff',
|
|
184
|
+
'color-index-page-logo-mask-background': 'linear-gradient(-45deg, #8baff8 50%, #84e0ff 50%)',
|
|
185
|
+
'color-index-page-second-text-color': 'rgba(60, 60, 60, .7)',
|
|
186
|
+
'color-index-page-divider-color': '#ddd',
|
|
187
|
+
'color-bar': '#fff',
|
|
188
|
+
'color-sub-bar': '#f5f5f5',
|
|
189
|
+
'color-text': '#555',
|
|
190
|
+
'color-sub-text': '#888',
|
|
191
|
+
'color-border': 'rgba(0, 0, 0, 0.12)',
|
|
192
|
+
'color-shadow': '#eee',
|
|
193
|
+
'color-introduce-border': '#2196f3',
|
|
194
|
+
'color-primary': '#2196f3',
|
|
195
|
+
'color-link': '#00c48f',
|
|
196
|
+
'color-type': '#00c48f',
|
|
197
|
+
'color-progress': '#1d92e9',
|
|
198
|
+
'color-progress-track': 'transparent',
|
|
199
|
+
'color-side-bar': '#3a7afe',
|
|
200
|
+
'color-side-bar-active-background': '#3a7afe1a',
|
|
201
|
+
'color-app-bar': '#3a7afe',
|
|
202
|
+
'color-nav-button-hover-background': 'rgba(0, 0, 0, 0.08)',
|
|
203
|
+
'color-mobile-cell-hover': '#3a7afe',
|
|
204
|
+
'color-pc-language-active': '#3a7afe',
|
|
205
|
+
'color-pc-language-active-background': '#edf5ff',
|
|
206
|
+
'color-pc-github-active-background': '#212121',
|
|
207
|
+
'color-mobile-language-active': '#3a7afe',
|
|
208
|
+
'color-mobile-language-active-background': '#edf5ff',
|
|
209
|
+
'color-hl-background': '#fafafa',
|
|
210
|
+
'color-hl-code': '#58727e',
|
|
211
|
+
'color-hl-border': '#f3f3f3',
|
|
212
|
+
'color-hl-group-a': '#7c7c7c',
|
|
213
|
+
'color-hl-group-b': '#2196f3',
|
|
214
|
+
'color-hl-group-c': '#ff9422',
|
|
215
|
+
'color-hl-group-d': '#58c193',
|
|
216
|
+
'color-hl-group-e': '#ff9422',
|
|
217
|
+
'color-hl-group-f': '#ff9422',
|
|
218
|
+
'color-hl-group-g': '#ff9422',
|
|
219
|
+
'color-hl-group-h': '#06a6e9',
|
|
220
|
+
'color-hl-group-i': '#f23733',
|
|
221
|
+
},
|
|
222
|
+
darkTheme: {
|
|
223
|
+
'color-body': '#121212',
|
|
224
|
+
'color-index-page-background': '#1e1e1e',
|
|
225
|
+
'color-index-page-feature-background': '#303030',
|
|
226
|
+
'color-index-page-logo-mask-background': 'linear-gradient(-45deg, #729dfc 50%, #6859f4 50%)',
|
|
227
|
+
'color-index-page-second-text-color': 'rgba(255, 255, 255, .75)',
|
|
228
|
+
'color-index-page-divider-color': 'rgba(84, 84, 84, .8)',
|
|
229
|
+
'color-bar': '#1e1e1e',
|
|
230
|
+
'color-sub-bar': '#272727',
|
|
231
|
+
'color-text': '#fff',
|
|
232
|
+
'color-sub-text': '#aaa',
|
|
233
|
+
'color-border': '#333',
|
|
234
|
+
'color-shadow': '#121212',
|
|
235
|
+
'color-introduce-border': '#555',
|
|
236
|
+
'color-primary': '#96cbfe',
|
|
237
|
+
'color-link': '#A8FFC4',
|
|
238
|
+
'color-type': '#A8FFC4',
|
|
239
|
+
'color-progress': '#5580f8',
|
|
240
|
+
'color-progress-track': 'transparent',
|
|
241
|
+
'color-side-bar': '#4a7afe',
|
|
242
|
+
'color-side-bar-active-background': '#4a7afe1a',
|
|
243
|
+
'color-app-bar': '#272727',
|
|
244
|
+
'color-nav-button-hover-background': 'rgba(255, 255, 255, 0.08)',
|
|
245
|
+
'color-mobile-cell-hover': '#4a7afe',
|
|
246
|
+
'color-pc-language-active': '#4a7afe',
|
|
247
|
+
'color-pc-language-active-background': '#4a7afe20',
|
|
248
|
+
'color-pc-github-active-background': '#303030',
|
|
249
|
+
'color-mobile-language-active': '#4a7afe',
|
|
250
|
+
'color-mobile-language-active-background': '#4a7afe20',
|
|
251
|
+
'color-hl-background': '#272727',
|
|
252
|
+
'color-hl-code': '#fff',
|
|
253
|
+
'color-hl-border': '#272727',
|
|
254
|
+
'color-hl-group-a': '#7c7c7c',
|
|
255
|
+
'color-hl-group-b': '#96cbfe',
|
|
256
|
+
'color-hl-group-c': '#ff7b1e',
|
|
257
|
+
'color-hl-group-d': '#A8FFC4',
|
|
258
|
+
'color-hl-group-e': '#ff7b1e',
|
|
259
|
+
'color-hl-group-f': '#ff7b1e',
|
|
260
|
+
'color-hl-group-g': '#ff7b1e',
|
|
261
|
+
'color-hl-group-h': '#14a6e9',
|
|
262
|
+
'color-hl-group-i': '#ed4648',
|
|
263
|
+
},
|
|
264
|
+
});
|