forked from cfillion/reapack.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.rb
40 lines (32 loc) · 1.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
require 'slim'
Middleman::Util::EnhancedHash.disable_warnings
module ::YAML
# remove after updating to middleman v5
def self.load(yaml, **kwargs)
Psych.safe_load yaml, permitted_classes: [Date, Time, DateTime, Symbol, Regexp], aliases: true, **kwargs
end
end
activate :asset_hash
activate :autoprefixer
activate :directory_indexes
configure :build do
activate :minify_css
activate :minify_javascript, ignore: /upload/
end
activate :external_pipeline,
name: :webpack,
command: [
"NODE_ENV=#{build? ? 'production' : 'development'}",
'$(npm bin)/webpack',
server? && '--watch' || nil,
].compact.join("\x20"),
source: ".webpack-build",
disable_background_execution: build?
ignore '/upload/*'
ignore '/stylesheets/upload-components.css'
set :slim, disable_escape: false, use_html_safe: false
set :sass_assets_paths, ['.webpack-build/stylesheets']
set :trailing_slash, false
set :host, 'https://reapack.com'
page 'errors/*', directory_index: false
page 'release-notes/*', layout: :release_notes_layout