chore(cli): remove unused type conversion

This commit is contained in:
陈嘉涵 2020-01-05 10:03:13 +08:00
parent 116b057cdb
commit a8f73f5e10

View File

@ -66,14 +66,14 @@ function resolveDocuments(components: string[]): DocumentItem[] {
}
const staticDocs = glob.sync(join(DOCS_DIR, '**/*.md')).map(path => {
const pairs = parse(path.toString()).name.split('.');
const pairs = parse(path).name.split('.');
return {
name: formatName(pairs[0], pairs[1] || defaultLang),
path
};
});
return [...staticDocs, ...docs.filter(item => existsSync(item.path))] as DocumentItem[];
return [...staticDocs, ...docs.filter(item => existsSync(item.path))];
}
function genImportDocuments(items: DocumentItem[]) {