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
|
# File 'lib/much-rails/assets.rb', line 13
def self.configure_for_rails(rails)
MuchRails::Assets.configure do |config|
if !rails.env.development?
config.fingerprint_cache MuchRails::Assets::MemCache.new
config.content_cache MuchRails::Assets::MemCache.new
else
config.fingerprint_cache MuchRails::Assets::NoCache.new
config.content_cache MuchRails::Assets::NoCache.new
end
if !rails.env.development? && !rails.env.test?
config.file_store rails.root.join("public")
end
config.source rails.root.join("app", "assets", "css") do |s|
s.base_path "css"
s.filter do |paths|
paths.reject{ |p| File.basename(p) =~ /^_.*\.scss$/ }
end
s.engine "scss", MuchRails::Assets::Erubi::Engine
s.engine "scss", MuchRails::Assets::Sass::Engine, {
syntax: "scss",
output_style: "compressed",
}
end
config.source rails.root.join("app", "assets", "img") do |s|
s.base_path "img"
end
config.source rails.root.join("app", "assets", "js") do |s|
s.base_path "js"
s.engine "js", MuchRails::Assets::Erubi::Engine
end
config.source rails.root.join("app", "assets", "vendor") do |s|
s.base_path "vendor"
end
end
MuchRails::Assets.init
end
|