diff --git a/package.json b/package.json index 1db7c22..08f1ab8 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/build/index.ts b/src/build/index.ts index 83f6f42..bcd095c 100644 --- a/src/build/index.ts +++ b/src/build/index.ts @@ -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(); }); }); }