From 84807e60d61a309378e2bb0271e8a1c228b3676b Mon Sep 17 00:00:00 2001 From: Erik Hetzner Date: Sat, 21 Mar 2015 10:23:20 -0700 Subject: [PATCH] add note on minification --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.md b/README.md index 16ecee0e..f8a27b4c 100644 --- a/README.md +++ b/README.md @@ -247,6 +247,35 @@ found in both `node_modules` and `bower_components`. Now you should be ready to deploy. +See also the note on [Javascript minification](#javascript-minification) + +## Javascript minification + +When precompiling assets in production, you will probably want to +ensure that you are not minifying your javascript twice, in EmberCLI +and in Rails. This can slow down assets precompilation considerably. + +There are two ways to do this. You can disable minification in Ember +by modifying your `ember-cli-build.js` as follows: + +```javascript + var app = new EmberApp({ + ... + minifyJS: false, + ... + } +``` + +or you can disable minification in Rails by setting: + +```ruby + config.assets.js_compressor = nil +``` + +in your `config/environments/production.rb` file. Either method has +trade-offs, but you do not want to do both. + + ## Additional Information When running in the development environment, EmberCLI Rails runs `ember build`