Load extensions found in ~/.compass/extensions, if the directory exists.
This commit is contained in:
parent
cca6474ba2
commit
3272dc7e5a
@ -14,7 +14,12 @@ The Documentation for the [latest stable release](http://compass-style.org/docs/
|
||||
|
||||
The Documentation for the [latest preview release](http://beta.compass-style.org/)
|
||||
|
||||
0.11.beta.3 (3/15/2011)
|
||||
0.11.beta.4 (UNRELEASED)
|
||||
------------------------
|
||||
|
||||
* Extensions that are installed into ~/.compass/extensions will be automatically available to all your compass projects.
|
||||
|
||||
0.11.beta.3 (03/15/2011)
|
||||
------------------------
|
||||
|
||||
### Compass CSS3
|
||||
|
@ -20,3 +20,10 @@ Feature: Extensions
|
||||
When I run: compass frameworks
|
||||
Then the list of frameworks includes "testing"
|
||||
|
||||
@listframeworks
|
||||
Scenario: Shared extensions directory
|
||||
Given I am using the existing project in test/fixtures/stylesheets/compass
|
||||
And the "~/.compass/extensions" directory exists
|
||||
And and I have a fake extension at ~/.compass/extensions/testing
|
||||
When I run: compass frameworks
|
||||
Then the list of frameworks includes "testing"
|
||||
|
@ -14,7 +14,10 @@ module Compass
|
||||
def lib_directory
|
||||
File.expand_path(File.join(File.dirname(__FILE__)))
|
||||
end
|
||||
module_function :base_directory, :lib_directory
|
||||
def shared_extension_paths
|
||||
[File.expand_path("~/.compass/extensions")]
|
||||
end
|
||||
module_function :base_directory, :lib_directory, :shared_extension_paths
|
||||
extend QuickCache
|
||||
end
|
||||
|
||||
|
@ -101,7 +101,12 @@ module Compass
|
||||
end
|
||||
|
||||
def discover_extensions!
|
||||
if File.exists?(configuration.extensions_path)
|
||||
Compass.shared_extension_paths.each do |extensions_path|
|
||||
if File.directory?(extensions_path)
|
||||
Compass::Frameworks.discover(extensions_path)
|
||||
end
|
||||
end
|
||||
if File.directory?(configuration.extensions_path)
|
||||
Compass::Frameworks.discover(configuration.extensions_path)
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user