@@ -27,27 +27,28 @@ let _post_compile_func = null;
2727
2828function compilerCallback ( err , stats ) {
2929 if ( err ) { // so a fatal error occurred. Stop here.
30- console . log ( `\n--- Webpack - ${ Conf . TAR_BASE } - error: ${ err } ` . bold . red ) ;
30+ console . log ( `\n--- Webpack - ${ Conf . TAR_BASE } - error: ${ err } ` ) ;
3131 return 1 ;
3232 }
3333
34- let jsonStats = stats . toJson ( statsOptions ) ;
34+ const jsonStats = stats . toJson ( statsOptions ) ;
3535
3636 if ( jsonStats . errors . length > 0 ) {
37- jsonStats . errors . map ( error => console . log ( `✗ Error: Webpack - v${ jsonStats . version } - : ${ error } ` . bold . red ) ) ;
37+ console . log ( `✗ Error: Webpack - v${ jsonStats . version } :` ) ;
38+ jsonStats . errors . map ( error => console . log ( error ) ) ;
3839 return 2 ;
3940 }
4041
4142 if ( jsonStats . warnings . length > 0 ) {
42- console . log ( 'Webpack generated the following warnings: ' . bold . yellow ) ;
43- jsonStats . warnings . map ( warning => console . log ( warning . bold . yellow ) ) ;
43+ console . log ( `⚕︎ Warning: Webpack - v ${ jsonStats . version } :` ) ;
44+ jsonStats . warnings . map ( warning => console . log ( warning ) ) ;
4445 }
4546
46- console . log ( `\n=== Webpack v${ jsonStats . version } - ${ jsonStats . hash } - ${ jsonStats . time } ms\n` . green ) ;
47+ console . log ( `\nWebpack v${ jsonStats . version } - ${ jsonStats . hash } - ${ jsonStats . time } ms\n` ) ;
4748 jsonStats . assets . map ( a => console . log ( `${ a . name } \t\tsize:${ a . size } \tstatus:${ a . emitted ? 'ok' : 'error' } ` ) ) ;
4849
4950 // if we got this far, the build succeeded.
50- console . log ( `\n=== Webpack v${ jsonStats . version } - ${ Conf . TAR_BASE } - success` . green . bold ) ;
51+ console . log ( `\nSuccess: Webpack v${ jsonStats . version } - ${ Conf . TAR_BASE } - success` ) ;
5152 console . log ( "process.env.NODE_ENV" , process . env . NODE_ENV ) ;
5253
5354 if ( typeof ( _post_compile_func ) === 'function' ) {
@@ -58,13 +59,13 @@ function compilerCallback(err, stats) {
5859}
5960
6061function compileOnce ( ) {
61- console . log ( '\n=== Generating minified bundle ...\n' . bold . blue ) ;
62+ console . log ( '\n=== Generating minified bundle ...\n' ) ;
6263 const webpackConfig = webpackConfigBuilder ( 'production' ) ;
6364 webpack ( webpackConfig ) . run ( compilerCallback ) ;
6465}
6566
6667function watchCompile ( callback ) {
67- console . log ( '\n=== Watching and generating minified bundle ...' . bold . blue ) ;
68+ console . log ( '\n=== Watching and generating minified bundle ...' ) ;
6869 _post_compile_func = callback ;
6970 const webpackConfigWatch = webpackConfigBuilder ( 'development' ) ;
7071 webpack ( webpackConfigWatch ) . watch ( { aggregateTimeout : 10 , poll : true } , compilerCallback ) ;
0 commit comments