function webpackProgress(compiler, headingMessage) {
  var bar = new ProgressBar(' '+ headingMessage + ' [:bar] :percent : :message', {
    complete: '=',
    incomplete: ' ',
    width: 50,
    total: 100
  });
  var lastPercentage = 0;
  compiler.apply(new ProgressPlugin(function(percentage, msg) {
    if (percentage > lastPercentage) {
      bar.update(percentage, {'message' : msg});
      lastPercentage = percentage;
    } else {
      bar.update(lastPercentage, {'message' : msg});
    }
    if (lastPercentage === 1) {
      lastPercentage = 0;
    }
  }));
}
// Display a progress bar in the console output when compiling a webpack project
Display a progress bar in the console output when compiling a webpack project
Display a progress bar in the console output when compiling a webpack project
function webpackProgress(compiler, headingMessage) {
  var bar = new ProgressBar(' '+ headingMessage + ' [:bar] :percent : :message', {
    complete: '=',
    incomplete: ' ',
    width: 50,
    total: 100
  });
  var lastPercentage = 0;
  compiler.apply(new ProgressPlugin(function(percentage, msg) {
    if (percentage > lastPercentage) {
      bar.update(percentage, {'message' : msg});
      lastPercentage = percentage;
    } else {
      bar.update(lastPercentage, {'message' : msg});
    }
    if (lastPercentage === 1) {
      lastPercentage = 0;
    }
  }));
}
function webpackProgress ( compiler , headingMessage ) { var bar = new ProgressBar ( ' ' + headingMessage + ' [:bar] :percent : :message' , { complete : '=' , incomplete : ' ' , width : 50 , total : 100 } ) ; var lastPercentage = 0 ; compiler . apply ( new ProgressPlugin ( function ( percentage , msg ) { if ( percentage > lastPercentage ) { bar . update ( percentage , { 'message' : msg } ) ; lastPercentage = percentage ; } else { bar . update ( lastPercentage , { 'message' : msg } ) ; } if ( lastPercentage === 1 ) { lastPercentage = 0 ; } } ) ) ; }
Display a progress bar in the console output when compiling a webpack project
Display a progress bar in the console output when compiling a webpack project