From d195ec6f9d0f5cf6411788ccbbb4eed1584104e0 Mon Sep 17 00:00:00 2001
From: a-morales <antonio.morales@originate.com>
Date: Mon, 28 Nov 2016 09:25:20 -0800
Subject: [PATCH] add verbose flag to react-scripts start command

---
 packages/react-scripts/scripts/start.js   | 6 ++++++
 packages/react-scripts/template/README.md | 2 ++
 2 files changed, 8 insertions(+)

diff --git a/packages/react-scripts/scripts/start.js b/packages/react-scripts/scripts/start.js
index 752bd8a08..03f77a2f4 100644
--- a/packages/react-scripts/scripts/start.js
+++ b/packages/react-scripts/scripts/start.js
@@ -60,6 +60,12 @@ if (isSmokeTest) {
   };
 }
 
+// Disabling clearing of console
+var isVerbose = process.argv.some(arg => arg.indexOf('--verbose') > -1);
+if (isVerbose) {
+  clearConsole = function() { return; };
+}
+
 function setupCompiler(host, port, protocol) {
   // "Compiler" is a low-level interface to Webpack.
   // It lets us listen to some events and provide our own custom messages.
diff --git a/packages/react-scripts/template/README.md b/packages/react-scripts/template/README.md
index 48409092a..480559c14 100644
--- a/packages/react-scripts/template/README.md
+++ b/packages/react-scripts/template/README.md
@@ -125,6 +125,8 @@ Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
 The page will reload if you make edits.<br>
 You will also see any lint errors in the console.
 
+If you don't want the console to be cleared on reload, you can invoke `npm start --verbose`
+
 ### `npm test`
 
 Launches the test runner in the interactive watch mode.<br>
-- 
GitLab