Allow stand-alone projects to have their own extensions directory.

This commit is contained in:
Chris Eppstein 2009-07-26 22:47:59 -07:00
parent bc27541378
commit 44e810e840
5 changed files with 22 additions and 3 deletions

View File

@ -10,6 +10,9 @@ module Compass
read_project_configuration
Compass.add_configuration(options)
Compass.add_configuration(installer.completed_configuration)
if File.exists?(Compass.configuration.extensions_path)
Compass::Frameworks.discover(Compass.configuration.extensions_path)
end
end
def installer

View File

@ -1,9 +1,9 @@
module Compass
module Commands
class ListFrameworks
class ListFrameworks < ProjectBase
attr_accessor :options
def initialize(working_path, options)
self.options = options
super
end
def execute

View File

@ -12,10 +12,10 @@ module Compass
super(working_path, options)
self.project_name = determine_project_name(working_path, options)
Compass.configuration.project_path = determine_project_directory(working_path, options)
configure!
end
def execute
configure!
super
end
@ -23,6 +23,9 @@ module Compass
def configure!
read_project_configuration
if File.exists?(Compass.configuration.extensions_path)
Compass::Frameworks.discover(Compass.configuration.extensions_path)
end
end
def projectize(path)

View File

@ -8,10 +8,12 @@ module Compass
:sass_dir,
:images_dir,
:javascripts_dir,
:extensions_dir,
:css_path,
:sass_path,
:images_path,
:javascripts_path,
:extensions_path,
:http_path,
:http_images_dir,
:http_stylesheets_dir,

View File

@ -10,6 +10,10 @@ module Compass
"/"
end
def default_extensions_dir
"extensions"
end
def default_output_style
if top_level.environment == :development
:expanded
@ -46,6 +50,13 @@ module Compass
end
end
def default_extensions_path
if (pp = top_level.project_path) && (dir = top_level.extensions_dir)
File.join(pp, dir)
end
end
def default_http_images_dir
top_level.images_dir
end