2014-05-02 17:46:03 -04:00
|
|
|
require_dependency 'sass/discourse_stylesheets'
|
|
|
|
require_dependency 'sass/discourse_sass_importer'
|
|
|
|
require_dependency 'sass/discourse_safe_sass_importer'
|
2014-04-09 09:47:19 -04:00
|
|
|
|
2016-04-17 22:47:52 -04:00
|
|
|
DiscourseSassTemplate = Class.new(Sass::Rails::SassTemplate) do
|
|
|
|
def importer_class
|
|
|
|
DiscourseSassImporter
|
2014-11-10 20:58:56 -05:00
|
|
|
end
|
2016-04-17 22:47:52 -04:00
|
|
|
end
|
|
|
|
DiscourseScssTemplate = Class.new(DiscourseSassTemplate) do
|
|
|
|
def syntax
|
|
|
|
:scss
|
2014-11-10 20:58:56 -05:00
|
|
|
end
|
2016-04-17 22:47:52 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
Rails.application.config.assets.configure do |env|
|
|
|
|
env.register_engine '.sass', DiscourseSassTemplate
|
|
|
|
env.register_engine '.scss', DiscourseScssTemplate
|
2014-11-10 20:58:56 -05:00
|
|
|
end
|