mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Bring back the shims under lib/sass.
These were accidentally nuked during the merge with master.
This commit is contained in:
parent
b1529b5e0d
commit
9bf8c1644f
4 changed files with 41 additions and 0 deletions
8
lib/sass.rb
Normal file
8
lib/sass.rb
Normal file
|
@ -0,0 +1,8 @@
|
|||
dir = File.dirname(__FILE__)
|
||||
$LOAD_PATH.unshift dir unless $LOAD_PATH.include?(dir)
|
||||
|
||||
require 'haml'
|
||||
|
||||
unless Haml::Util.try_sass
|
||||
load Haml::Util.scope('vendor/sass/lib/sass.rb')
|
||||
end
|
8
lib/sass/plugin.rb
Normal file
8
lib/sass/plugin.rb
Normal file
|
@ -0,0 +1,8 @@
|
|||
dir = File.dirname(File.dirname(__FILE__))
|
||||
$LOAD_PATH.unshift dir unless $LOAD_PATH.include?(dir)
|
||||
|
||||
require 'haml'
|
||||
|
||||
unless Haml::Util.try_sass
|
||||
load Haml::Util.scope('vendor/sass/lib/sass/plugin.rb')
|
||||
end
|
9
lib/sass/rails2_shim.rb
Normal file
9
lib/sass/rails2_shim.rb
Normal file
|
@ -0,0 +1,9 @@
|
|||
Haml::Util.try_sass
|
||||
Haml::Util.haml_warn(<<WARNING)
|
||||
Haml will no longer automatically load Sass in Haml 3.2.0.
|
||||
Please add config.gem 'sass' to your environment.rb.
|
||||
WARNING
|
||||
|
||||
require 'sass'
|
||||
require 'sass/plugin'
|
||||
|
16
lib/sass/rails3_shim.rb
Normal file
16
lib/sass/rails3_shim.rb
Normal file
|
@ -0,0 +1,16 @@
|
|||
unless Haml::Util.try_sass
|
||||
# Since Bundler sets up our gem environment,
|
||||
# Sass will only be loadable from gem
|
||||
# if gem "sass" has been set.
|
||||
Haml::Util.haml_warn(<<WARNING)
|
||||
Haml will no longer automatically load Sass in Haml 3.2.0.
|
||||
Please add gem 'sass' to your Gemfile.
|
||||
WARNING
|
||||
end
|
||||
|
||||
require 'sass/plugin/configuration'
|
||||
|
||||
ActiveSupport.on_load(:before_initialize) do
|
||||
require 'sass'
|
||||
require 'sass/plugin'
|
||||
end
|
Loading…
Add table
Reference in a new issue