mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-11 08:11:15 -05:00
20 lines
502 B
Ruby
20 lines
502 B
Ruby
|
# sass-rails expects an actual file to exists when calling `@import`. However,
|
||
|
# we don't actually create the files for our special imports but rather inject
|
||
|
# them dynamically.
|
||
|
module Discourse
|
||
|
module Sprockets
|
||
|
module Resolve
|
||
|
def resolve(path, options = {})
|
||
|
return [path, []] if DiscourseSassImporter.special_imports.has_key?(File.basename(path, '.scss'))
|
||
|
super
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
|
||
|
module Sprockets
|
||
|
class Base
|
||
|
prepend Discourse::Sprockets::Resolve
|
||
|
end
|
||
|
end
|