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
--- 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.