File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 9
9
10
10
configure :build do
11
11
activate :gzip
12
- activate :minify_css
13
12
activate :minify_javascript , compressor : Terser . new
14
13
15
14
activate :asset_hash do |config |
20
19
21
20
after_configuration do
22
21
use ::HtmlCompressor ::Rack ,
22
+ if : :use_middleware? ,
23
23
compress_css : true ,
24
24
compress_javascript : true ,
25
25
css_compressor : :yui ,
26
26
enabled : true ,
27
- javascript_compressor : :yui ,
27
+ javascript_compressor : Terser . new ,
28
28
preserve_line_breaks : false ,
29
29
preserve_patterns : [ ] ,
30
30
remove_comments : true ,
67
67
source : ".build/js" ,
68
68
latency : 2
69
69
70
+ helpers do
71
+ def use_middleware? ( path )
72
+ puts 'path: ' + path
73
+ path != '/scrollerful/demo/simple/index.html'
74
+ end
75
+ end
76
+
70
77
ignore '.DS_Store'
71
78
72
79
page '/*.json' , layout : false
You can’t perform that action at this time.
0 commit comments