mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00

This works better with precompilation, since a file only needs to be re-compiled if the file itself has been modified.
27 lines
579 B
Ruby
27 lines
579 B
Ruby
module Sass
|
|
module Tree
|
|
class FileNode < Node
|
|
def initialize(filename)
|
|
@filename = filename
|
|
super()
|
|
end
|
|
|
|
def to_s(*args)
|
|
super()
|
|
rescue Sass::SyntaxError => e
|
|
e.add_backtrace_entry(@filename)
|
|
raise e
|
|
end
|
|
|
|
protected
|
|
|
|
def perform!(environment)
|
|
self.children = Sass::Files.tree_for(filename, @options).children
|
|
self.children = perform_children(environment)
|
|
rescue Sass::SyntaxError => e
|
|
e.add_backtrace_entry(@filename)
|
|
raise e
|
|
end
|
|
end
|
|
end
|
|
end
|