-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.rb
40 lines (31 loc) · 866 Bytes
/
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
require "builder"
activate :autoprefixer do |prefix|
prefix.browsers = "last 2 versions"
end
activate :asset_hash
activate :directory_indexes
activate :livereload
command =
if build?
"./node_modules/webpack/bin/webpack.js --bail -p"
else
"./node_modules/webpack/bin/webpack.js --watch -d --progress --color"
end
external_pipeline_options = {
name: :webpack, command: command, source: ".tmp/dist", latency: 1
}
activate :external_pipeline, external_pipeline_options
set :relative_links, true
configure :development do
config[:css_dir] = ".tmp/dist"
config[:js_dir] = ".tmp/dist"
end
page "/*.xml", layout: false
page "/*.json", layout: false
page "/*.txt", layout: false
page "/sitemap.html", layout: false
configure :build do
config[:http_prefix] = ""
config[:css_dir] = ""
config[:js_dir] = ""
end