mirror of https://github.com/status-im/metro.git
metro-bundler: fix percent progress output
Reviewed By: davidaurelio Differential Revision: D5236226 fbshipit-source-id: efbbf46f4212a66a6357b7d87059f89354b6f50b
This commit is contained in:
parent
d3195fa528
commit
626fe47667
|
@ -101,16 +101,16 @@ class TerminalReporter {
|
||||||
): string {
|
): string {
|
||||||
const localPath = path.relative('.', bundleOptions.entryFile);
|
const localPath = path.relative('.', bundleOptions.entryFile);
|
||||||
return util.format(
|
return util.format(
|
||||||
'Bundling `%s` %s%s% (%s/%s)%s %s, %s, %s',
|
'Bundling `%s` [%s, %s, %s] %s%s%% (%s/%s)%s',
|
||||||
localPath,
|
localPath,
|
||||||
|
bundleOptions.dev ? 'development' : 'production',
|
||||||
|
bundleOptions.minify ? 'minified' : 'non-minified',
|
||||||
|
bundleOptions.hot ? 'hmr enabled' : 'hmr disabled',
|
||||||
phase === 'in_progress' ? getProgressBar(ratio, 16) + ' ' : '',
|
phase === 'in_progress' ? getProgressBar(ratio, 16) + ' ' : '',
|
||||||
(100 * ratio).toFixed(1),
|
(100 * ratio).toFixed(1),
|
||||||
transformedFileCount,
|
transformedFileCount,
|
||||||
totalFileCount,
|
totalFileCount,
|
||||||
phase === 'done' ? ', done.' : (phase === 'failed' ? ', failed.' : ''),
|
phase === 'done' ? ', done.' : (phase === 'failed' ? ', failed.' : ''),
|
||||||
bundleOptions.dev ? 'development' : 'production',
|
|
||||||
bundleOptions.minify ? 'minified' : 'non-minified',
|
|
||||||
bundleOptions.hot ? 'hmr enabled' : 'hmr disabled',
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue