Switch over to new config methods
This commit is contained in:
parent
781fa1c65f
commit
a50ca56fbc
22 changed files with 119 additions and 115 deletions
|
@ -42,11 +42,8 @@ module Middleman
|
|||
app.define_hook :build_config
|
||||
app.define_hook :development_config
|
||||
|
||||
if ENV["AUTOLOAD_SPROCKETS"]
|
||||
app.set :autoload_sprockets, (ENV["AUTOLOAD_SPROCKETS"] == "true")
|
||||
else
|
||||
app.set :autoload_sprockets, true
|
||||
end
|
||||
app.config.define_setting :autoload_sprockets, true, 'Automatically load sprockets at startup?'
|
||||
app.config[:autoload_sprockets] = (ENV["AUTOLOAD_SPROCKETS"] == "true") if ENV["AUTOLOAD_SPROCKETS"]
|
||||
|
||||
app.extend ClassMethods
|
||||
app.send :include, InstanceMethods
|
||||
|
@ -134,7 +131,7 @@ module Middleman
|
|||
instance_eval File.read(local_config), local_config, 1
|
||||
end
|
||||
|
||||
if autoload_sprockets
|
||||
if config[:autoload_sprockets]
|
||||
begin
|
||||
require "middleman-sprockets"
|
||||
activate(:sprockets)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue