From 3d0c21517465c38fb5ba5dae9c3df10d4098ee4f Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Thu, 9 Jan 2014 13:20:12 +0100 Subject: [PATCH] Use ember.prod.js when compiling for production For some reason uflify fails on regular ember.js build. Using production build fixes the problem and we should do it anyway - our assets pipeline does some debug version cleaning, but I'm not sure if it's still compatible with what's done when generating Ember's production build. --- Assetfile | 5 +++++ lib/travis/assets.rb | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Assetfile b/Assetfile index 4eccd2fc..8c867331 100644 --- a/Assetfile +++ b/Assetfile @@ -31,6 +31,11 @@ input assets.scripts do end match 'vendor/**/*.js' do + if assets.production? + reject 'ember.js' + else + reject 'ember.prod.js' + end safe_concat assets.vendor_order, 'vendor.js' end diff --git a/lib/travis/assets.rb b/lib/travis/assets.rb index b37412c9..8f172e7d 100644 --- a/lib/travis/assets.rb +++ b/lib/travis/assets.rb @@ -8,6 +8,7 @@ module Travis TYPES = [:styles, :scripts, :images, :static, :vendor] VENDOR_ORDER = %w(jquery.min minispade handlebars ember) + PRODUCTION_VENDOR_ORDER = %w(jquery.min minispade handlebars ember.prod) SPEC_VENDOR_ORDER = %w(jasmine jasmine-html jasmine-runner sinon) attr_reader :roots, :env @@ -30,7 +31,8 @@ module Travis end def vendor_order - VENDOR_ORDER.map { |name| "vendor/#{name}.js" } + order = production? ? PRODUCTION_VENDOR_ORDER : VENDOR_ORDER + order.map { |name| "vendor/#{name}.js" } end def spec_vendor_order