Skip to content
This repository was archived by the owner on Dec 16, 2019. It is now read-only.

Commit bee0170

Browse files
committed
Added :run_on_changes_end Guard hook
1 parent 6b6f623 commit bee0170

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/guard/sass.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,18 @@ def run_with_partials(paths)
139139
# '_'), calls {#run_with_partials} so that files which include it are
140140
# rebuilt.
141141
#
142+
# Fires a `:run_on_changes_end` hook with a `changed_files` array and
143+
# a `success` bool as parameters.
144+
#
142145
# @param paths [Array<String>]
143146
# @raise [:task_has_failed]
144147
def run_on_changes(paths)
145148
return run_with_partials(paths) if paths.any? {|f| partial?(f) }
146149

147150
changed_files, success = @runner.run(paths)
148151

152+
hook :end, Array(changed_files), success
153+
149154
throw :task_has_failed unless success
150155
end
151156

0 commit comments

Comments
 (0)