add build settings to config.rb
Tom Rutgers
committed Aug 17, 2018
commit 0458abdef8c189691b11d62cdab8476c75c9f640
Showing 1
changed file with
14 additions
and 4 deletions
config.rb
+14
-4
| @@ | @@ -1,5 +1,6 @@ |
| #Bootstrap is used to style bits of the demo. Remove it from the config, gemfile and stylesheets to stop using bootstrap | |
| require 'bootstrap-sass' | |
| + | require "uglifier" |
| # Activate and configure extensions | |
| # https://middlemanapp.com/advanced/configuration/#configuring-extensions | |
| @@ | @@ -62,7 +63,16 @@ end |
| # Build-specific configuration | |
| # https://middlemanapp.com/advanced/configuration/#environment-specific-settings | |
| - | # configure :build do |
| - | # activate :minify_css |
| - | # activate :minify_javascript |
| - | # end |
| + | configure :build do |
| + | # Minify css on build |
| + | activate :minify_css |
| + | |
| + | # Minify Javascript on build |
| + | activate :minify_javascript, compressor: ::Uglifier.new(mangle: true, compress: { drop_console: true }, output: {comments: :none} ) |
| + | |
| + | # Use Gzip |
| + | activate :gzip |
| + | |
| + | #Use asset hashes to use for caching |
| + | activate :asset_hash |
| + | end |