10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# File 'lib/compass-rails4/patches/sass_importer.rb', line 10
def evaluate_with_compass_rails(context, locals, &block)
cache_store = Sprockets::SassCacheStore.new(context.environment)
paths = context.environment.paths.map { |path| CompassRails4::SpriteImporter.new(context, path) }
paths += context.environment.paths.map { |path| Sprockets::SassImporter.new(context, path) }
paths += CompassRails4.sass_config.load_paths
options = CompassRails4.sass_config.merge( {
:filename => eval_file,
:line => line,
:syntax => syntax,
:cache_store => cache_store,
:importer => Sprockets::SassImporter.new(context, context.pathname),
:load_paths => paths,
:sprockets => {
:context => context,
:environment => context.environment
}
})
::Sass::Engine.new(data, options).render
rescue ::Sass::SyntaxError => e
context.__LINE__ = e.sass_backtrace.first[:line]
raise e
end
|