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 147 c7d2b19d20bc2aca1dbe262c698bb12655607f84
parent 146 0a99e7ad3665aa2d2d2e2d1dbbfb78246db02d67
child 148 879e331e126d6023e04be41cb7105a6001bb02c5
push idunknown
push userunknown
push dateunknown
reviewerssmacleod
bugs1115707
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.