Skip to content

Commit b4b5f32

Browse files
author
Rafael Mendonça França
committed
Add an extension pointer for custom importer
1 parent ca08fcf commit b4b5f32

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lib/sass/rails/template.rb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ def evaluate(context, locals, &block)
1515
:line => line,
1616
:syntax => syntax,
1717
:cache_store => cache_store,
18-
:importer => SassImporter.new(context, context.pathname.to_s),
19-
:load_paths => context.environment.paths.map { |path| SassImporter.new(context, path.to_s) },
18+
:importer => importer_class.new(context, context.pathname.to_s),
19+
:load_paths => context.environment.paths.map { |path| importer_class.new(context, path.to_s) },
2020
:sprockets => {
2121
:context => context,
2222
:environment => context.environment
@@ -30,6 +30,12 @@ def evaluate(context, locals, &block)
3030
context.__LINE__ = e.sass_backtrace.first[:line]
3131
raise e
3232
end
33+
34+
private
35+
36+
def importer_class
37+
SassImporter
38+
end
3339
end
3440

3541
class ScssTemplate < SassTemplate

0 commit comments

Comments
 (0)