feat(cli): gen vetur config
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
// @ts-ignore
|
||||
import markdownVetur from '@vant/markdown-vetur';
|
||||
import { join } from 'path';
|
||||
import { get } from 'lodash';
|
||||
import { SRC_DIR, getVantConfig, ROOT } from '../common/constant';
|
||||
|
||||
// generate vetur tags & attributes
|
||||
export function genVeturConfig() {
|
||||
const vantCongig = getVantConfig();
|
||||
const options = get(vantCongig, 'build.vetur');
|
||||
|
||||
if (options) {
|
||||
markdownVetur.parseAndWrite({
|
||||
path: SRC_DIR,
|
||||
test: /zh-CN\.md/,
|
||||
outputDir: join(ROOT, 'vetur'),
|
||||
...options
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user