mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
[Sass] Leave FileNodes unresolved until perform-time.
This works better with precompilation, since a file only needs to be re-compiled if the file itself has been modified.
This commit is contained in:
parent
5a945e1533
commit
8cc5243eec
2 changed files with 4 additions and 3 deletions
|
@ -437,7 +437,7 @@ END
|
|||
|
||||
next Tree::DirectiveNode.new("@import url(#{filename})") if filename =~ /\.css$/
|
||||
|
||||
Tree::FileNode.new(filename, Sass::Files.tree_for(filename, @options).children)
|
||||
Tree::FileNode.new(filename)
|
||||
end.flatten
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
module Sass
|
||||
module Tree
|
||||
class FileNode < Node
|
||||
def initialize(filename, children)
|
||||
def initialize(filename)
|
||||
@filename = filename
|
||||
self.children = children
|
||||
super()
|
||||
end
|
||||
|
||||
def to_s(*args)
|
||||
|
@ -16,6 +16,7 @@ module Sass
|
|||
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)
|
||||
|
|
Loading…
Add table
Reference in a new issue