-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathAssetfile
45 lines (35 loc) · 888 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
37
38
39
40
41
42
43
44
45
require "json"
require "uglifier"
require "rake-pipeline-web-filters"
# this gives you concat, coffee_script, and minispade methods
require "rake-pipeline-web-filters/helpers"
output "tests/source"
input "packages" do
match "*/{lib,tests}/**/*.coffee" do
coffee_script
end
match "*/{lib,tests}/**/*.js" do
minispade :rewrite_requires => true, :string => true, :module_id_generator => proc { |input|
id = input.path.dup
id.sub!('/lib/', '/')
id.sub!(/\.js$/, '')
id.sub!(/\/main$/, '')
id.sub!('/tests', '/~tests')
id
}
concat do |filename|
filename =~ %r{/tests/} ? "ember-tests.js" : "ember.js"
end
end
# Hack to ignore certain files
match "**/*.{json,md}" do
concat "trash"
end
match "**/README" do
concat "trash"
end
match "*/*.js" do
concat "trash"
end
end
# vim: filetype=ruby