]> source.dussan.org Git - sonarqube.git/commitdiff
use envify to log only in development
authorStas Vilchik <vilchiks@gmail.com>
Wed, 16 Dec 2015 15:52:51 +0000 (16:52 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Wed, 16 Dec 2015 15:52:51 +0000 (16:52 +0100)
server/sonar-web/package.json
server/sonar-web/src/main/js/apps/code/store/configureStore.js

index 53e6738360ba2214354a28578e0e7d412e5ad321..570d3b97d2191982b54a521e803e8cc49faa3f95 100644 (file)
@@ -23,6 +23,7 @@
     "clipboard": "1.5.5",
     "d3": "3.5.6",
     "del": "2.0.2",
+    "envify": "^3.4.0",
     "enzyme": "^1.2.0",
     "eslint": "^1.10.3",
     "eslint-plugin-import": "^0.11.0",
@@ -85,7 +86,8 @@
     "transform": [
       "hbsfy",
       "babelify",
-      "browserify-shim"
+      "browserify-shim",
+      "envify"
     ]
   }
 }
index 20d1587895a9cb19e8a799ebe9f62968d481ee38..821c23f5ae0e968f15f5448a5e9a11e53a2c962c 100644 (file)
@@ -4,10 +4,13 @@ import createLogger from 'redux-logger';
 
 import rootReducer from '../reducers';
 
+const logger = createLogger({
+  predicate: () => process.env.NODE_ENV === 'development'
+});
 
 const createStoreWithMiddleware = applyMiddleware(
     thunk,
-    createLogger()
+    logger
 )(createStore);