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.
This commit is contained in:
Piotr Sarnacki 2014-01-09 13:20:12 +01:00
parent e0c062ad15
commit 3d0c215174
2 changed files with 8 additions and 1 deletions

View File

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

View File

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