From 626fe47667fe73074c69a0a5b6da2c80c0987a97 Mon Sep 17 00:00:00 2001 From: Jean Lauliac Date: Tue, 13 Jun 2017 08:35:47 -0700 Subject: [PATCH] metro-bundler: fix percent progress output Reviewed By: davidaurelio Differential Revision: D5236226 fbshipit-source-id: efbbf46f4212a66a6357b7d87059f89354b6f50b --- packages/metro-bundler/src/lib/TerminalReporter.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/metro-bundler/src/lib/TerminalReporter.js b/packages/metro-bundler/src/lib/TerminalReporter.js index 5dae8054..f7a87414 100644 --- a/packages/metro-bundler/src/lib/TerminalReporter.js +++ b/packages/metro-bundler/src/lib/TerminalReporter.js @@ -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', ); }