Created
December 29, 2011 09:37
-
-
Save netzpirat/1533227 to your computer and use it in GitHub Desktop.
Listen to file changes with Guard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'guard/listener' | |
listener = Guard::Listener.select_and_init({ | |
watchdir: '/tmp', | |
watch_all_modifications: true | |
}) | |
listener.on_change do |files| | |
puts "File change: #{ files.join(',') }" | |
end | |
listener.start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment