forked from travis-ci/travis-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAssetFile
81 lines (66 loc) · 1.54 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
$: << 'lib'
require 'rake-pipeline-web-filters'
require 'travis/assets'
require 'compass'
assets ||= Travis::Assets.new
assets.setup_compass
assets.update_version
output 'public/scripts'
input assets.scripts do
match '**/*.hbs' do
travis_handlebars :precompile => assets.production?
concat 'templates.js'
end
match '**/*.coffee' do
coffee_script
end
match 'vendor/**/*.js' do
safe_concat assets.vendor_order, 'vendor.js'
end
match '{spec,spec/unit}/*.js' do
concat 'spec/specs.js'
end
match 'spec/support/*.js' do
concat 'spec/support.js'
end
match 'spec/vendor/*.js' do
concat assets.spec_vendor_order, 'spec/vendor.js'
end
match 'spec/{vendor,support,specs}.js' do
concat ['spec/vendor.js', 'spec/support.js', 'spec/specs.js'], 'specs.js'
end
match %r(^(?!vendor|spec).*\.js$) do
modules = proc { |input| input.path.gsub(%r((^app/|lib/|\.js$)), '') }
minispade(string: assets.development?, rewrite_requires: true, module_id_generator: modules)
end
match %r(^(?!spec).*\.js$) do
concat ['vendor.js'], ['app.js', 'min/app.js']
end
if assets.production?
match 'min/app.js' do
strip_debug
uglify squeeze: true
concat 'app.min.js'
end
end
end
output 'public/styles'
input assets.styles do
match '**/*.{scss,sass}' do
sass
concat [], 'app.css'
end
end
output 'public/images'
input assets.images do
skip %r(^ui/)
match '**/*' do
copy
end
end
# output 'public'
# input assets.static do
# match '**/*' do
# copy
# end
# end