fix(cli): missing fs.existsSync

This commit is contained in:
chenos 2023-07-08 09:54:23 +08:00
parent b93858cf4c
commit 6aeb9b321e

View File

@ -51,7 +51,7 @@ module.exports = (cli) => {
if (command === 'serve') { if (command === 'serve') {
// 如果是多语言,则需要进入内部,如果不是多语言,则直接进入 docs/dist // 如果是多语言,则需要进入内部,如果不是多语言,则直接进入 docs/dist
let dir = resolve(cwd, 'docs/dist', process.env.DOC_LANG); let dir = resolve(cwd, 'docs/dist', process.env.DOC_LANG);
if (!existsSync(dir)) { if (!fs.existsSync(dir)) {
dir = resolve(cwd, 'docs/dist'); dir = resolve(cwd, 'docs/dist');
} }
run('serve', [dir]); run('serve', [dir]);