[Rails] Move most of the contents of the compass initializer back to the compass codebase. Discover compass extensions automatically during boot.
This commit is contained in:
parent
755b9a3a11
commit
5864f2aeab
@ -34,6 +34,13 @@ module Compass
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def initialize!
|
||||||
|
rails_root = (defined?(Rails) ? Rails.root : RAILS_ROOT).to_s
|
||||||
|
Compass.add_project_configuration(File.join(root, "config", "compass.rb"))
|
||||||
|
Compass.discover_extensions!
|
||||||
|
Compass.configure_sass_plugin!
|
||||||
|
Compass.handle_configuration_change!
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -105,10 +105,8 @@ NEXTSTEPS
|
|||||||
|
|
||||||
def initializer_contents
|
def initializer_contents
|
||||||
%Q{require 'compass'
|
%Q{require 'compass'
|
||||||
|rails_root = (defined?(Rails) ? Rails.root : RAILS_ROOT).to_s
|
|require 'compass/app_integration/rails'
|
||||||
|Compass.add_project_configuration(File.join(rails_root, "config", "compass.rb"))
|
|Compass::AppIntegration::Rails.initialize!
|
||||||
|Compass.configure_sass_plugin!
|
|
||||||
|Compass.handle_configuration_change!
|
|
||||||
|}.gsub(/^\s+\|/,'')
|
|}.gsub(/^\s+\|/,'')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user