try to fix deactivation
This commit is contained in:
parent
216ebed109
commit
ac11d6dbd2
1 changed files with 7 additions and 4 deletions
|
@ -21,15 +21,15 @@ module Middleman
|
||||||
|
|
||||||
use Rack::ConditionalGet if environment == :development
|
use Rack::ConditionalGet if environment == :development
|
||||||
|
|
||||||
set :features, [:compass]
|
@@features = []
|
||||||
|
|
||||||
def self.enable(*opts)
|
def self.enable(*opts)
|
||||||
self.features << opts
|
@@features << opts
|
||||||
super
|
super
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.disable(*opts)
|
def self.disable(*opts)
|
||||||
self.features -= opts
|
@@features -= opts
|
||||||
super
|
super
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -92,6 +92,8 @@ class Middleman::Base
|
||||||
use Middleman::Rack::Static
|
use Middleman::Rack::Static
|
||||||
use Middleman::Rack::Sprockets
|
use Middleman::Rack::Sprockets
|
||||||
|
|
||||||
|
enable :compass
|
||||||
|
|
||||||
# Features disabled by default
|
# Features disabled by default
|
||||||
disable :slickmap
|
disable :slickmap
|
||||||
disable :cache_buster
|
disable :cache_buster
|
||||||
|
@ -117,7 +119,8 @@ class Middleman::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
# loop over enabled feature
|
# loop over enabled feature
|
||||||
self.features.flatten.each do |feature_name|
|
@@features.flatten.each do |feature_name|
|
||||||
|
next unless send(:"#{feature_name}?")
|
||||||
puts "== Enabling: #{feature_name.capitalize}" if logging?
|
puts "== Enabling: #{feature_name.capitalize}" if logging?
|
||||||
require "middleman/features/#{feature_name}"
|
require "middleman/features/#{feature_name}"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue