Factored out a Configuration object to parse stand-alone project configuration files.

This commit is contained in:
Chris Eppstein 2009-02-01 14:18:27 -08:00
parent 845fa14e71
commit 59e626fe8b
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,17 @@
module Compass
class Configuration
attr_accessor :css_dir, :sass_dir, :images_dir, :javascripts_dir
# parses a manifest file which is a ruby script
# evaluated in a Manifest instance context
def parse(config_file)
open(config_file) do |f|
eval(f.read, instance_binding, config_file)
end
end
def instance_binding
binding
end
end
end

View File

@ -2,6 +2,7 @@ require 'optparse'
require 'rubygems'
require 'haml'
require File.join(Compass.lib_directory, 'compass', 'logger')
require File.join(Compass.lib_directory, 'compass', 'configuration')
module Compass
module Exec