Added a configuration helper method to access the compass load paths suitable for passing to the Sass option :load_paths

This commit is contained in:
Chris Eppstein 2009-03-16 20:08:38 -07:00
parent 2558e8cff3
commit 356f134621

View File

@ -114,6 +114,12 @@ module Compass
end end
def to_sass_engine_options def to_sass_engine_options
engine_opts = {:load_paths => sass_load_paths}
engine_opts[:style] = output_style if output_style
engine_opts
end
def sass_load_paths
load_paths = [] load_paths = []
if project_path && sass_dir if project_path && sass_dir
load_paths << File.join(project_path, sass_dir) load_paths << File.join(project_path, sass_dir)
@ -121,9 +127,7 @@ module Compass
Compass::Frameworks::ALL.each do |framework| Compass::Frameworks::ALL.each do |framework|
load_paths << framework.stylesheets_directory load_paths << framework.stylesheets_directory
end end
engine_opts = {:load_paths => load_paths} load_paths
engine_opts[:style] = output_style if output_style
engine_opts
end end
# Support for testing. # Support for testing.