@@ -51,15 +51,17 @@ npm run assets:build -- vue-quill
5151 }
5252
5353 async function buildAssets ( target : string ) {
54- const rootDir = path . resolve ( __dirname , '..' )
5554 const pkgDir = path . resolve ( __dirname , `../packages/${ target } ` )
5655 const assets = require ( path . resolve ( pkgDir , 'assets.config.json' ) )
5756
5857 // only build published packages for release
5958 if ( isRelease && assets . private ) return
6059 if ( ! assets . css . length ) return
60+ console . log (
61+ chalk . cyan ( `\n>>>>>>>>>>>>>>>>>>>> BUILD ASSETS <<<<<<<<<<<<<<<<<<<<` )
62+ )
6163
62- assets . css . forEach ( async ( css : any ) => {
64+ await assets . css . forEach ( async ( css : any ) => {
6365 const input = path . resolve ( pkgDir , css . input )
6466 const inputExt = path . extname ( input )
6567 const output = path . resolve ( pkgDir , css . output )
@@ -70,30 +72,9 @@ npm run assets:build -- vue-quill
7072 )
7173
7274 if ( inputExt === '.styl' || inputExt === '.css' ) {
73- if ( ! prodOnly ) {
74- console . log (
75- chalk . cyan ( `${ input } → ${ path . relative ( rootDir , output ) } ...` )
76- )
77- execa . sync ( 'stylus' , [ input , '-o' , output ] )
78- console . log (
79- chalk . green (
80- `created: ${ chalk . bold ( path . relative ( rootDir , output ) ) } \n`
81- )
82- )
83- }
84-
75+ if ( ! prodOnly ) await execa ( 'stylus' , [ input , '-o' , output ] , { stdio : 'inherit' } )
8576 // create production build
86- if ( ! devOnly ) {
87- console . log (
88- chalk . cyan ( `${ input } → ${ path . relative ( rootDir , outputProd ) } ...` )
89- )
90- execa . sync ( 'stylus' , [ input , '-o' , outputProd , '-c' ] )
91- console . log (
92- chalk . green (
93- `created: ${ chalk . bold ( path . relative ( rootDir , outputProd ) ) } \n`
94- )
95- )
96- }
77+ if ( ! devOnly ) await execa ( 'stylus' , [ input , '-o' , outputProd , '-c' ] , { stdio : 'inherit' } )
9778 } else {
9879 console . log ( chalk . redBright ( `File extention not supported: ${ input } ` ) )
9980 }
0 commit comments