Skip to content

Commit

Permalink
fix the race condition for creating assets folder
Browse files Browse the repository at this point in the history
  • Loading branch information
loreanvictor committed Apr 29, 2020
1 parent 16aedf8 commit 030dd40
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@codedoc/core",
"version": "0.1.35",
"version": "0.1.36",
"description": "Create beautiful modern documentation websites.",
"main": "dist/es5/index.js",
"module": "dist/es6/index.js",
Expand Down
16 changes: 8 additions & 8 deletions src/build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@ export async function build(
)
.peek(file => console.log(`${chalk.green('#')}${chalk.gray(' built:: .........')} ${join(file.root, file.path)}`))
.process()
.collect(() => {
.collect(async () => {
console.log(`${chalk.gray('# building ........ ' + _styles.path)}`);
await _styles.save();
console.log(`${chalk.green('#')} ${chalk.gray('built:: .........')} ${_styles.path}`)

console.log(`${chalk.gray('# building ........ ' + _bundle.path)}`);
Promise.all([
save(_bundle, webpackConfig)
.then(() => console.log(`${chalk.green('#')} ${chalk.gray('built:: .........')} ${_bundle.path}`)),
_styles.save()
.then(() => console.log(`${chalk.green('#')} ${chalk.gray('built:: .........')} ${_styles.path}`)),
])
.then(resolve);
await save(_bundle, webpackConfig);
console.log(`${chalk.green('#')} ${chalk.gray('built:: .........')} ${_bundle.path}`);

resolve();
});
});
}

0 comments on commit 030dd40

Please sign in to comment.