-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.rb
83 lines (66 loc) · 2.02 KB
/
config.rb
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
# --------------------------------------
# Config
# --------------------------------------
page '/*.xml', layout: false
page '/*.json', layout: false
page '/*.txt', layout: false
# ----- Assets ----- #
set :css_dir, 'assets/stylesheets'
set :js_dir, 'assets/javascripts'
set :images_dir, 'assets/images'
set :fonts_dir, 'assets/fonts'
# ----- Images ----- #
# activate :automatic_image_sizes
#
# activate :imageoptim do |options|
# options.verbose = true
#
# options.image_extensions = %w(.png .jpg .gif .svg)
#
# options.advpng = { :level => 4 }
# options.gifsicle = { :interlace => false }
# options.jpegoptim = { :strip => ['all'], :max_quality => 50 }
# options.jpegtran = { :copy_chunks => false, :progressive => true, :jpegrescan => true }
# options.optipng = { :level => 6, :interlace => false }
# options.pngcrush = { :chunks => ['alla'], :fix => false, :brute => false }
# options.pngout = { :copy_chunks => false, :strategy => 0 }
# options.svgo = {}
#
# end
# --------------------------------------
# Helpers
# --------------------------------------
# --------------------------------------
# Content
# --------------------------------------
# ----- Directories ----- #
activate :directory_indexes
page '/404.html', directory_index: false
# --------------------------------------
# Development
# --------------------------------------
# ----- Output ----- #
set :haml, {attr_wrapper: '"'}
activate :minify_html do |html|
html.remove_quotes = false
html.remove_intertag_spaces = true
end
# ----- Optimization ----- #
configure :build do
activate :minify_css
activate :minify_html do |html|
html.remove_quotes = false
html.remove_intertag_spaces = true
end
activate :minify_javascript
activate :relative_assets
activate :gzip
end
# ----- Prefixing ----- #
activate :autoprefixer do |config|
config.browsers = ['last 1 version', 'Explorer >= 10']
config.cascade = false
end
# --------------------------------------
# Production
# --------------------------------------