Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
40 lines (31 sloc) 913 Bytes
instance_eval File.read(EmberDev.support_path.join('Assetfile'))
distros = {
"template-compiler" => %w(ember-handlebars-compiler),
"ember-autosuggest" => %w(ember-template-compiler ember-autosuggest)
}
output "dist"
distros.each do |name, modules|
input "dist/modules" do
module_paths = modules.map{|m| "#{m}.js" }
match "{#{module_paths.join(',')}}" do
concat(module_paths){ ["#{name}.js", "#{name}.prod.js"] }
end
match "{#{name}.js,#{name}.prod.js}" do
filter HandlebarsPrecompiler
end
match "#{name}.js" do
filter VersionInfo
end
# Strip dev code
match "#{name}.prod.js" do
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