UNPKG

webpackbar

Version:

Elegant ProgressBar and Profiler for Webpack

27 lines (20 loc) 611 B
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _profiler = require('../profiler'); var _profiler2 = _interopRequireDefault(_profiler); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } class ProfileReporter { constructor() { this.profiler = new _profiler2.default(); } allDone() { const formattedStats = this.profiler.getFormattedStats(); process.stderr.write(`\n${formattedStats}\n`); } progress(context) { this.profiler.onRequest(context.state.request); } } exports.default = ProfileReporter;