Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
Disable compiling (minifying) JS files on deploy
Browse files Browse the repository at this point in the history
... because we don't even use the minified files on production anyway!

This change was motivated because #161 broke
the JS compile step in deploy.sh. Ideally we should fix that and re-enable
minification, but until we re-enable minification there is no point to compiling
JS on deploy.
  • Loading branch information
divad12 committed Apr 20, 2014
1 parent e5461b9 commit ad83530
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
5 changes: 5 additions & 0 deletions config/flask_prod.py
Expand Up @@ -2,7 +2,12 @@

import rmc.shared.secrets as s

# TODO(david): Re-enable minification by changing this directory to 'js_prod'.
# Minification was disabled in github.com/UWFlow/rmc/commit/52fae50b
# to be able to debug Airbrake issues, but it looks like Airbrake supports
# source maps now.
JS_DIR = 'js'

DEBUG = False
ENV = 'prod'
GA_PROPERTY_ID = 'UA-35073503-1'
Expand Down
17 changes: 15 additions & 2 deletions deploy.sh
Expand Up @@ -26,8 +26,21 @@ sudo pip install -r requirements.txt
echo "Compiling compass"
compass compile server --output-style compressed --force

echo "Compiling js"
( cd server && node r.js -o build.js )
# TODO(david): Uncomment the two lines below to re-enable compiling and
# minifying JS. This involves doing the following:
# 1. Fix this compile step: running this will result in an error right now.
# This runs the Require.js optimizer (see
# http://requirejs.org/docs/optimization.html), which parses out and
# tries to run the contents of `require.config({})` in
# server/static/js/main.js. However, in github.com/UWFlow/rmc/pull/161 we
# moved the raw JSON contents of main.js:require.config() into its own
# file, config_settings.js, in order to facilitate a consistent
# environment for JS tests.
# 2. Change JS_DIR in flask_prod.py from 'js' to 'js_prod', where the
# minified files end up. This will require producing source maps and
# configuring Airbrake to use them.
#echo "Compiling js"
#( cd server && node r.js -o build.js )

sudo service rmc_daemon restart
sudo service celeryd restart
Expand Down

0 comments on commit ad83530

Please sign in to comment.