-
Notifications
You must be signed in to change notification settings - Fork 9
/
Assetfile
91 lines (78 loc) · 1.7 KB
/
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
require 'barber'
require "rake-pipeline-web-filters"
require "json"
require "uglifier"
ember_template_name_proc = proc { |input|
dir = File.dirname(input.path)
dir = dir.sub!('templates/', '')
template_name = File.basename(input.path, File.extname(input.path))
template_name = dir + '/' + template_name if !dir.nil?
template_name
}
output "site"
input "js" do
match "**/*.js" do
minispade :rewrite_requires => true, :string => false, :module_id_generator => Proc.new { |input|
input.path.dup.\
sub(/\.js$/, '')
}
end
match "**/*.hbs" do
handlebars wrapper_proc: Barber::Ember::FilePrecompiler, :key_name_proc => ember_template_name_proc
end
match "**/*.js" do
concat "app.js"
if ENV['RAKEP_MODE'] == "production"
uglify
end
end
end
input "lib" do
match "**/*.js" do
filter(
Rake::Pipeline::OrderingConcatFilter,
[
"minispade.js",
"jquery-2.0.0.js",
"handlebars.js",
"ember.js",
"ember-data.js"
],
"libs.js"
)
end
end
#input "prod_lib" do
# match "**/*.js" do
# filter(
# Rake::Pipeline::OrderingConcatFilter,
# [
# "minispade.js",
# "jquery-2.0.0.min.js",
# "handlebars.runtime.js",
# "ember.js"
# ],
# "libs.js"
# )
# uglify
# end
#end
input "css" do
match "**/*.css" do
filter(
Rake::Pipeline::OrderingConcatFilter,
[
"bootstrap.min.css",
"bootstrap-responsive.min.css",
"highlight/sunburst.css"
],
"app.css"
)
end
end
output ""
input "static" do
match "index.html" do
copy
end
end