metro-bundler: fix percent progress output

Reviewed By: davidaurelio

Differential Revision: D5236226

fbshipit-source-id: efbbf46f4212a66a6357b7d87059f89354b6f50b
This commit is contained in:
Jean Lauliac 2017-06-13 08:35:47 -07:00 committed by Facebook Github Bot
parent d3195fa528
commit 626fe47667
1 changed files with 4 additions and 4 deletions

View File

@ -101,16 +101,16 @@ class TerminalReporter {
): string {
const localPath = path.relative('.', bundleOptions.entryFile);
return util.format(
'Bundling `%s` %s%s% (%s/%s)%s %s, %s, %s',
'Bundling `%s` [%s, %s, %s] %s%s%% (%s/%s)%s',
localPath,
bundleOptions.dev ? 'development' : 'production',
bundleOptions.minify ? 'minified' : 'non-minified',
bundleOptions.hot ? 'hmr enabled' : 'hmr disabled',
phase === 'in_progress' ? getProgressBar(ratio, 16) + ' ' : '',
(100 * ratio).toFixed(1),
transformedFileCount,
totalFileCount,
phase === 'done' ? ', done.' : (phase === 'failed' ? ', failed.' : ''),
bundleOptions.dev ? 'development' : 'production',
bundleOptions.minify ? 'minified' : 'non-minified',
bundleOptions.hot ? 'hmr enabled' : 'hmr disabled',
);
}