Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[Sass] Fix sass --update file1:file2.
file1 was being recompiled even when file2 was newer.
  • Loading branch information
nex3 committed Dec 16, 2010
1 parent f42f60c commit 8a76ecf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions doc-src/SASS_CHANGELOG.md
Expand Up @@ -13,6 +13,8 @@
* Fix a bug where boolean operators (`and`, `or`, and `not`) wouldn't work at the end of a line
in a multiline SassScript expression.

* When using `sass --update`, only update individual files when they've changed.

## 3.0.24

[Tagged on GitHub](http://github.com/nex3/haml/commit/3.0.24).
Expand Down
9 changes: 6 additions & 3 deletions lib/sass/plugin.rb
Expand Up @@ -67,12 +67,15 @@ def update_stylesheets(individual_files = [])
return if options[:never_update]

run_updating_stylesheets individual_files

individual_files.each {|t, c| update_stylesheet(t, c)}

@checked_for_updates = true
staleness_checker = StalenessChecker.new

individual_files.each do |t, c|
if options[:always_update] || staleness_checker.stylesheet_needs_update?(c, t)
update_stylesheet(t, c)
end
end

template_location_array.each do |template_location, css_location|

Dir.glob(File.join(template_location, "**", "*.s[ca]ss")).sort.each do |file|
Expand Down

0 comments on commit 8a76ecf

Please sign in to comment.