-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.rb
80 lines (70 loc) · 2.59 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
# Load Sass from node_modules
config[:sass_assets_paths] << File.join(root, 'node_modules')
set :css_dir, 'assets/stylesheets'
set :fonts_dir, 'assets/fonts'
set :images_dir, 'assets/images'
set :js_dir, 'assets/javascripts'
# activate :autoprefixer do |prefix|
# prefix.browsers = "last 2 versions"
# end
activate :external_pipeline,
name: :webpack,
command: build? ? 'yarn run build' : 'yarn run start',
source: 'dist',
latency: 1
# ------ Uncomment and adapt if you want to use i18n ------
# activate :i18n, mount_at_root: :fr, langs: [:fr, :en]
page '/*.xml', layout: false
page '/*.json', layout: false
page '/*.txt', layout: false
page '/404.html', layout: "error_pages"
page '/500.html', layout: "error_pages"
# activate :directory_indexes
configure :development do
set :debug_assets, true
activate :livereload
activate :pry
end
configure :build do
activate :minify_css
# activate :minify_javascript
activate :minify_html, remove_input_attributes: false
activate :asset_hash
activate :relative_assets
set :relative_links, true
activate :favicon_maker do |f|
f.template_dir = File.join(root, 'source')
f.output_dir = File.join(root, 'build')
f.icons = {
"_favicon_template.png" => [
{ icon: "apple-touch-icon-180x180-precomposed.png" },
{ icon: "apple-touch-icon-152x152-precomposed.png" },
{ icon: "apple-touch-icon-144x144-precomposed.png" },
{ icon: "apple-touch-icon-120x120-precomposed.png" },
{ icon: "apple-touch-icon-114x114-precomposed.png" },
{ icon: "apple-touch-icon-76x76-precomposed.png" },
{ icon: "apple-touch-icon-72x72-precomposed.png" },
{ icon: "apple-touch-icon-60x60-precomposed.png" },
{ icon: "apple-touch-icon-57x57-precomposed.png" },
{ icon: "apple-touch-icon-precomposed.png", size: "57x57" },
{ icon: "apple-touch-icon.png", size: "57x57" },
{ icon: "favicon-196x196.png" },
{ icon: "favicon-160x160.png" },
{ icon: "favicon-96x96.png" },
{ icon: "favicon-32x32.png" },
{ icon: "favicon-16x16.png" },
{ icon: "favicon.png", size: "16x16" },
{ icon: "favicon.ico", size: "64x64,32x32,24x24,16x16" },
{ icon: "mstile-70x70.png", size: "70x70" },
{ icon: "mstile-144x144.png", size: "144x144" },
{ icon: "mstile-150x150.png", size: "150x150" },
{ icon: "mstile-310x310.png", size: "310x310" },
{ icon: "mstile-310x150.png", size: "310x150" }
]
}
end
end
activate :deploy do |deploy|
deploy.build_before = true
deploy.deploy_method = :git
end