Factored out a Configuration object to parse stand-alone project configuration files.
This commit is contained in:
parent
845fa14e71
commit
59e626fe8b
17
lib/compass/configuration.rb
Normal file
17
lib/compass/configuration.rb
Normal 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
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user