7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/sassc/rails/template.rb', line 7
def call(input)
context = input[:environment].context_class.new(input)
options = {
filename: input[:filename],
syntax: self.class.syntax,
load_paths: input[:environment].paths,
importer: SassC::Rails::Importer,
sprockets: {
context: context,
environment: input[:environment],
dependencies: context.metadata[:dependency_paths]
}
}
engine = ::SassC::Engine.new(input[:data], options)
css = Sprockets::Utils.module_include(::SassC::Script::Functions, @functions) do
engine.render
end
context.metadata.merge(data: css)
end
|