forked from toranb/ember-data-django-rest-adapter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Assetfile
36 lines (29 loc) · 869 Bytes
/
Assetfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
distros = {
:full => %w(ember-data-django-rest-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-django-rest-adapter"
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
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