WIP mozreview: don't compress javascript inside the dev environment (bug 1115707); r!smacleod draft
authorbyron jones <glob@mozilla.com>
Mon, 08 Aug 2016 12:37:33 +0800
changeset 9464 c5f6b71fcf4a793881bcf48c5cb660d636de5549
parent 9463 45bad2c26d38c3c92ff4da2214352bdaedeb7912
child 9465 2cb79cc98da839870a9171a8fd0fc63583ab85db
push id1188
push userbjones@mozilla.com
push dateThu, 01 Sep 2016 13:14:49 +0000
bugs1115707
WIP mozreview: don't compress javascript inside the dev environment (bug 1115707); r!smacleod To make debugging javasript easier, disable minification of javascript when running within our development environment. MozReview-Commit-ID: DnlpPG7fP41
reviewboard/reviewboard/settings.py
--- a/reviewboard/reviewboard/settings.py
+++ b/reviewboard/reviewboard/settings.py
@@ -370,16 +370,20 @@ LOGIN_REDIRECT_URL = SITE_ROOT + 'dashbo
 
 
 # Static media setup
 from reviewboard.staticbundles import PIPELINE_CSS, PIPELINE_JS
 
 PIPELINE_CSS_COMPRESSOR = None
 PIPELINE_JS_COMPRESSOR = 'pipeline.compressors.uglifyjs.UglifyJSCompressor'
 
+# Don't compress JS in a MozReview development environment.
+if os.getenv('MOZREVIEW_DEV', '0') == '1':
+    PIPELINE_JS_COMPRESSOR = None
+
 # On production (site-installed) builds, we always want to use the pre-compiled
 # versions. We want this regardless of the DEBUG setting (since they may
 # turn DEBUG on in order to get better error output).
 #
 # On a build running out of a source tree, for testing purposes, we want to
 # use the raw .less and JavaScript files when DEBUG is set. When DEBUG is
 # turned off in a non-production build, though, we want to be able to play
 # with the built output, so treat it like a production install.