From 0755c968ac81367777ef00101f98d7c2a62a7c5a Mon Sep 17 00:00:00 2001 From: tdreyno Date: Tue, 4 Aug 2009 15:28:25 -0700 Subject: [PATCH] continue fixing config loading --- lib/middleman.rb | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/lib/middleman.rb b/lib/middleman.rb index 55e8164d..cb510537 100644 --- a/lib/middleman.rb +++ b/lib/middleman.rb @@ -50,14 +50,8 @@ class Middleman < Sinatra::Base puts "== The Middleman is already standing watch on port #{port}!" end - # Check for local config - local_config = File.join(self.root, "init.rb") - if File.exists? local_config - puts "== Local config at: #{local_config}" - class_eval File.read(local_config) - end - configure do + puts "config yo" Compass.configuration do |config| config.project_path = Dir.pwd config.sass_dir = File.join(File.basename(self.views), "stylesheets") @@ -66,7 +60,16 @@ class Middleman < Sinatra::Base config.http_images_path = "/images/" config.add_import_path(config.sass_dir) end - + end + + # Check for local config + local_config = File.join(self.root, "init.rb") + if File.exists? local_config + puts "== Local config at: #{local_config}" + class_eval File.read(local_config) + end + + configure do Compass.configure_sass_plugin! end