File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -7,16 +7,26 @@ const ProgressBar = require('progress');
77const chalk = require ( 'chalk' ) ;
88
99function BuildProgressPlugin ( ) {
10+ if ( process . env . CI ) {
11+ return new ProgressPlugin ( function handler ( percentage , msg ) {
12+ // noop
13+ } )
14+ }
1015 const bar = new ProgressBar ( ` [:bar] ${ chalk . bold ( ':percent' ) } ${ chalk . yellow ( ':etas' ) } (${ chalk . dim ( ':msg' ) } )` , {
1116 total : 100 ,
1217 complete : '=' ,
1318 incomplete : ' ' ,
1419 width : 25
1520 } ) ;
16- return new ProgressPlugin ( function ( percent , msg ) {
17- if ( percent === 1 ) msg = 'completed' ;
21+ return new ProgressPlugin ( function handler ( percent , msg ) {
22+ const done = percent === 1 ;
23+ if ( done ) {
24+ msg = 'completed' ;
25+ }
1826 bar . update ( percent , { msg } ) ;
19- if ( percent === 1 ) bar . terminate ( ) ;
27+ if ( done ) {
28+ bar . terminate ( ) ;
29+ }
2030 } ) ;
2131}
2232
You can’t perform that action at this time.
0 commit comments