lib/bard/sass.rb in bard-sass-0.1.0 vs lib/bard/sass.rb in bard-sass-0.2.0
- old
+ new
@@ -1,7 +1,17 @@
+require "sass"
require "bard/sass/version"
-module BardSass
- class Railtie < Rails::Engine
- # auto wire
+module Bard
+ module Sass
+ SASS_PATH = File.expand_path("../../sass", __dir__)
+
+ if defined?(Rails) && defined?(Rails::Engine)
+ class Engine < Rails::Engine
+ config.assets.paths << SASS_PATH
+ end
+ else
+ Sass.load_paths << SASS_PATH
+ end
end
end
+