chore: update token error
parent
b393a0a2dd
commit
261e7d0857
|
@ -91,7 +91,7 @@ export function formatter(
|
||||||
!tableTitle.includes('()')
|
!tableTitle.includes('()')
|
||||||
) {
|
) {
|
||||||
const childTag: VueTag = {
|
const childTag: VueTag = {
|
||||||
name: getComponentName(tableTitle.replaceAll('.', '').replaceAll('/', ''), tagPrefix),
|
name: getComponentName(tableTitle.replace(/\.|\//g, ''), tagPrefix),
|
||||||
slots: [],
|
slots: [],
|
||||||
events: [],
|
events: [],
|
||||||
attributes: [],
|
attributes: [],
|
||||||
|
|
|
@ -7,6 +7,7 @@ import { outputFileSync, readFileSync } from 'fs-extra';
|
||||||
import type { Options, VueTag } from './type';
|
import type { Options, VueTag } from './type';
|
||||||
import { getComponentName, normalizePath, toKebabCase } from './utils';
|
import { getComponentName, normalizePath, toKebabCase } from './utils';
|
||||||
import { genVeturAttributes, genVeturTags } from './vetur';
|
import { genVeturAttributes, genVeturTags } from './vetur';
|
||||||
|
import { flatMap } from 'lodash';
|
||||||
|
|
||||||
async function readMarkdown(options: Options): Promise<Map<String, VueTag>> {
|
async function readMarkdown(options: Options): Promise<Map<String, VueTag>> {
|
||||||
const mdPaths = await glob(normalizePath(`${options.path}/**/*.md`));
|
const mdPaths = await glob(normalizePath(`${options.path}/**/*.md`));
|
||||||
|
@ -22,7 +23,7 @@ async function readMarkdown(options: Options): Promise<Map<String, VueTag>> {
|
||||||
})
|
})
|
||||||
.filter(item => item) as VueTag[][];
|
.filter(item => item) as VueTag[][];
|
||||||
const tags: Map<String, VueTag> = new Map();
|
const tags: Map<String, VueTag> = new Map();
|
||||||
data.flatMap(item => item).forEach(mergedTag => mergeTag(tags, mergedTag));
|
flatMap(data, item => item).forEach(mergedTag => mergeTag(tags, mergedTag));
|
||||||
return tags;
|
return tags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ function readLine(input: string) {
|
||||||
function splitTableLine(line: string) {
|
function splitTableLine(line: string) {
|
||||||
line = line.replace(/\\\|/g, 'JOIN');
|
line = line.replace(/\\\|/g, 'JOIN');
|
||||||
|
|
||||||
const items = line.split('|').map(item => item.trim().replaceAll('JOIN', '|'));
|
const items = line.split('|').map(item => item.trim().replace(/JOIN/g, '|'));
|
||||||
|
|
||||||
// remove pipe character on both sides
|
// remove pipe character on both sides
|
||||||
items.pop();
|
items.pop();
|
||||||
|
|
|
@ -37,7 +37,7 @@ const useSiteToken = () => {
|
||||||
() => {
|
() => {
|
||||||
styleDom = styleDom || document.createElement('style');
|
styleDom = styleDom || document.createElement('style');
|
||||||
const tokenValue = mergedToken.value.token;
|
const tokenValue = mergedToken.value.token;
|
||||||
const demoGridColor = token.colorPrimary;
|
const demoGridColor = token.value.colorPrimary;
|
||||||
styleDom.innerHTML = `
|
styleDom.innerHTML = `
|
||||||
:root {
|
:root {
|
||||||
--header-height: ${tokenValue.headerHeight}px;
|
--header-height: ${tokenValue.headerHeight}px;
|
||||||
|
|
Loading…
Reference in New Issue