Fetching contributors…
Cannot retrieve contributors at this time
43 lines (34 sloc) 994 Bytes
require 'ember-dev'
distros = {
:full => %w(ember-data ember-inflector activemodel-adapter)
}
#MEGAHAX
ember_spade_postprocess = "filter EmberAddMicroLoader, :global => true"
instance_eval File.read(EmberDev.support_path.join('Assetfile'))
distros.each do |name, modules|
name = "ember-data"
input "dist/modules" do
module_paths = modules.map{|m| "#{m}.js" }
match "{#{module_paths.join(',')}}" do
concat(module_paths){ ["#{name}.js", "#{name}.prod.js"] }
filter EmberAddMicroLoader
end
match "#{name}.js" do
filter VersionInfo
filter EmberLicenseFilter
end
# Strip dev code
match "#{name}.prod.js" do
filter VersionInfo
filter EmberLicenseFilter
filter(EmberStripDebugMessagesFilter) { ["#{name}.prod.js", "min/#{name}.js"] }
end
# Minify
match "min/#{name}.js" do
uglify{ "#{name}.min.js" }
filter VersionInfo
filter EmberLicenseFilter
end
end
end
# vim: filetype=ruby