fix(cli): docs dir name

This commit is contained in:
陈嘉涵 2019-11-19 11:53:39 +08:00
parent 64731c9d5e
commit 058fade941
2 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,7 @@ export const CWD = process.cwd();
export const ES_DIR = join(CWD, 'es'); export const ES_DIR = join(CWD, 'es');
export const LIB_DIR = join(CWD, 'lib'); export const LIB_DIR = join(CWD, 'lib');
export const SRC_DIR = join(CWD, 'src'); 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 CONFIG_FILE = join(CWD, 'components.config.js');
export const DIST_DIR = join(__dirname, '../../dist'); export const DIST_DIR = join(__dirname, '../../dist');
export const CONFIG_DIR = join(__dirname, '../config'); export const CONFIG_DIR = join(__dirname, '../config');

View File

@ -4,7 +4,7 @@ import { existsSync, writeFileSync } from 'fs-extra';
import { pascalize, removeExt, getComponents } from '../common'; import { pascalize, removeExt, getComponents } from '../common';
import { import {
SRC_DIR, SRC_DIR,
DOC_DIR, DOCS_DIR,
DIST_DIR, DIST_DIR,
CONFIG_FILE, CONFIG_FILE,
DESKTOP_CONFIG_FILE DESKTOP_CONFIG_FILE
@ -26,7 +26,7 @@ function resolveDocuments(components: string[]): DocumentItem[] {
path: join(SRC_DIR, component, 'README.md') 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), name: pascalize(parse(path).name),
path path
})); }));