Skip to content

Commit

Permalink
fix dist no exists
Browse files Browse the repository at this point in the history
  • Loading branch information
chenshuai2144 committed Nov 23, 2019
1 parent 16e9d1c commit fd0d191
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit fd0d191

Please sign in to comment.