default extensions

This commit is contained in:
Thomas Reynolds 2011-07-06 10:18:02 -07:00
parent 1a285ae36e
commit c9e4d41533

View file

@ -33,6 +33,7 @@ module Middleman::CoreExtensions::Features
# The Feature API is itself a Feature. Mind blowing! # The Feature API is itself a Feature. Mind blowing!
class << self class << self
def registered(app) def registered(app)
app.set :default_extensions, []
app.extend ClassMethods app.extend ClassMethods
end end
alias :included :registered alias :included :registered
@ -78,12 +79,11 @@ module Middleman::CoreExtensions::Features
local_config = File.join(self.root, "config.rb") local_config = File.join(self.root, "config.rb")
if File.exists? local_config if File.exists? local_config
$stderr.puts "== Reading: Local config" if logging? $stderr.puts "== Reading: Local config" if logging?
Middleman::Server.class_eval File.read(local_config) class_eval File.read(local_config)
set :app_file, File.expand_path(local_config) set :app_file, File.expand_path(local_config)
end end
# Add in defaults # Add in defaults
$stderr.puts default_extensions
default_extensions.each do |ext| default_extensions.each do |ext|
activate ext activate ext
end end