From fd0d19185c780a92a0418d9fca80fd58bcfa716a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B8=85?= Date: Sat, 23 Nov 2019 23:37:00 +0800 Subject: [PATCH] fix dist no exists --- src/index.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/index.ts b/src/index.ts index 4d66bf9..4da5461 100644 --- a/src/index.ts +++ b/src/index.ts @@ -37,6 +37,13 @@ export default function( // 编译完成之后 api.onBuildSuccess(() => { api.log.pending('💄 build theme'); + + if (existsSync(api.winPath(join(outputPath, 'theme')))) { + rimraf.sync(api.winPath(join(outputPath, 'theme'))); + } + + mkdirSync(api.winPath(join(outputPath, 'theme')), { mode: 33279 }); + buildCss( cwd, options.theme.map(