From 058fade9419ab6305edd065062ee3415921941e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=98=89=E6=B6=B5?= Date: Tue, 19 Nov 2019 11:53:39 +0800 Subject: [PATCH] fix(cli): docs dir name --- packages/vant-cli/src/common/constant.ts | 2 +- packages/vant-cli/src/compiler/gen-desktop-config.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/vant-cli/src/common/constant.ts b/packages/vant-cli/src/common/constant.ts index 0c4d35616..b405f2ad9 100644 --- a/packages/vant-cli/src/common/constant.ts +++ b/packages/vant-cli/src/common/constant.ts @@ -4,7 +4,7 @@ export const CWD = process.cwd(); export const ES_DIR = join(CWD, 'es'); export const LIB_DIR = join(CWD, 'lib'); export const SRC_DIR = join(CWD, 'src'); -export const DOC_DIR = join(CWD, 'doc'); +export const DOCS_DIR = join(CWD, 'docs'); export const CONFIG_FILE = join(CWD, 'components.config.js'); export const DIST_DIR = join(__dirname, '../../dist'); export const CONFIG_DIR = join(__dirname, '../config'); diff --git a/packages/vant-cli/src/compiler/gen-desktop-config.ts b/packages/vant-cli/src/compiler/gen-desktop-config.ts index cfe813a5b..c6fcd430b 100644 --- a/packages/vant-cli/src/compiler/gen-desktop-config.ts +++ b/packages/vant-cli/src/compiler/gen-desktop-config.ts @@ -4,7 +4,7 @@ import { existsSync, writeFileSync } from 'fs-extra'; import { pascalize, removeExt, getComponents } from '../common'; import { SRC_DIR, - DOC_DIR, + DOCS_DIR, DIST_DIR, CONFIG_FILE, DESKTOP_CONFIG_FILE @@ -26,7 +26,7 @@ function resolveDocuments(components: string[]): DocumentItem[] { path: join(SRC_DIR, component, 'README.md') })); - const staticDocs = glob.sync(join(DOC_DIR, '**/*.md')).map(path => ({ + const staticDocs = glob.sync(join(DOCS_DIR, '**/*.md')).map(path => ({ name: pascalize(parse(path).name), path }));