init.rb 587 B

123456789101112131415161718
  1. begin
  2. require File.join(File.dirname(__FILE__), 'lib', 'sass') # From here
  3. rescue LoadError
  4. begin
  5. require 'sass' # From gem
  6. rescue LoadError => e
  7. # gems:install may be run to install Haml with the skeleton plugin
  8. # but not the gem itself installed.
  9. # Don't die if this is the case.
  10. raise e unless defined?(Rake) &&
  11. (Rake.application.top_level_tasks.include?('gems') ||
  12. Rake.application.top_level_tasks.include?('gems:install'))
  13. end
  14. end
  15. # Load Sass.
  16. # Sass may be undefined if we're running gems:install.
  17. require 'sass/plugin' if defined?(Sass)