Allow stand-alone projects to have their own extensions directory.
This commit is contained in:
parent
bc27541378
commit
44e810e840
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user