assette 0.0.12 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/assette.gemspec +1 -1
- data/lib/assette/config.rb +8 -2
- data/lib/assette/post_processors/js_min.rb +2 -2
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.13
|
data/assette.gemspec
CHANGED
data/lib/assette/config.rb
CHANGED
@@ -17,7 +17,8 @@ module Assette
|
|
17
17
|
class Config
|
18
18
|
MULTIPLES = %w{file_path asset_host}.freeze
|
19
19
|
SINGLES = %w{asset_dir templates_path template_format cache_method
|
20
|
-
template_preloader template_partial asset_version_file uglifier
|
20
|
+
template_preloader template_partial asset_version_file uglifier
|
21
|
+
minify}.freeze
|
21
22
|
BLOCKS = %w{after_compile}.freeze
|
22
23
|
|
23
24
|
OPTIONS = begin
|
@@ -40,7 +41,8 @@ module Assette
|
|
40
41
|
:templates_path => 'app/templates',
|
41
42
|
:template_format => 'AT.t[{*path*}] = {*template*};',
|
42
43
|
:after_compile => Proc.new {},
|
43
|
-
:uglifier => {:copyright => false, :mangle => false}
|
44
|
+
:uglifier => {:copyright => false, :mangle => false},
|
45
|
+
:minify => true
|
44
46
|
}.freeze
|
45
47
|
|
46
48
|
def initialize args = {}
|
@@ -104,6 +106,10 @@ module Assette
|
|
104
106
|
def compiling?
|
105
107
|
!!compiling
|
106
108
|
end
|
109
|
+
|
110
|
+
def minify?
|
111
|
+
!!minify
|
112
|
+
end
|
107
113
|
|
108
114
|
def asset_host i
|
109
115
|
return '' unless asset_hosts?
|
@@ -28,7 +28,7 @@ module Assette
|
|
28
28
|
class PostProcessor::JSMin < Assette::PostProcessor(:js)
|
29
29
|
|
30
30
|
def should_process?
|
31
|
-
Assette.config.compiling?
|
31
|
+
Assette.config.compiling? && Assette.config.minify?
|
32
32
|
end
|
33
33
|
|
34
34
|
def processor
|
@@ -36,4 +36,4 @@ module Assette
|
|
36
36
|
end
|
37
37
|
|
38
38
|
end
|
39
|
-
end
|
39
|
+
end
|
metadata
CHANGED