No commit activity in last 3 years
No release in over 3 years
Whenever files in your working directory change, execute a command, such as "rake test".
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 0.0
~> 0.7
 Project Readme

When Files Change

Do something when files change, it's that simple.

When files change, run my tests:

when-files-change -- rake test

When files change, build my css assets:

when-files-change -- make

When files change, make me a sandwich:

when-files-change -- sudo make-me-a-sandwhich

By default when-files-change ignores log folders, hidden files in your root, and source control directories. You can explicitly list any other files you want to ignore:

when-files-change --ignore 'build' -- make

To quit press CTRL-D or CTRL-C. To force the command to be run, press Enter.

That's about all there is to it. Most of the credit for this tool goes to the guard/listen library since it does all leg work. when-files-change just wraps it in an easy to use command.

Used with a build tool like Rake, Make, or some other *ake, you can save yourself a lot of time and hassle. If this doesn't suit your needs, take a look at Guard or Watchr, both projects allow special rules for processing various types of events.

Installation

Install when-files-change with rubygems:

gem install when-files-change

Adam Sanderson, http://www.monkeyandcrow.com