execute modes as configure blocks
This commit is contained in:
parent
e4090760e8
commit
f73e89370d
|
@ -51,12 +51,12 @@
|
|||
# Change the images directory
|
||||
# set :images_dir, "alternative_image_directory"
|
||||
|
||||
# Production build configuration
|
||||
# Production configuration
|
||||
configure :production do
|
||||
# For example, change the Compass output style for deployment
|
||||
# activate :minify_css
|
||||
|
||||
# Minify Javascript on build
|
||||
# Minify Javascript
|
||||
# activate :minify_javascript
|
||||
|
||||
# Enable cache buster
|
||||
|
@ -65,11 +65,6 @@ configure :production do
|
|||
# Use relative URLs
|
||||
# activate :relative_assets
|
||||
|
||||
# Compress PNGs after build
|
||||
# First: gem install middleman-smusher
|
||||
# require "middleman-smusher"
|
||||
# activate :smusher
|
||||
|
||||
# Or use a different image path
|
||||
# set :http_prefix, "/Content/images/"
|
||||
end
|
||||
|
|
|
@ -286,7 +286,11 @@ module Middleman
|
|||
config_context.instance_eval File.read(env_config), env_config, 1
|
||||
end
|
||||
|
||||
# Run any `configure` blocks for the current environment.
|
||||
config_context.execute_configure_callbacks(config[:environment])
|
||||
|
||||
# Run any `configure` blocks for the current mode.
|
||||
config_context.execute_configure_callbacks(config[:mode])
|
||||
end
|
||||
|
||||
def add_to_instance(name, &func)
|
||||
|
|
Loading…
Reference in a new issue