Guard::Depend
guard-depend is useful for projects that produce build output like binaries. guard-depend will only run the command you specify if the build output does not exist or is not up to date with regard to the watched files.
- Tested against Ruby 1.9.3, 2.0.0 and 2.1.0
Installation
Please be sure to have Guard installed before continue.
Add this line to your application's Gemfile
:
group :development do
gem 'guard-depend'
end
And then execute:
$ bundle install guard-depend
Or install manually:
$ gem install guard-depend
Add guard definition to your Guardfile
by running this command:
$ guard init depend
Usage
Please read Guard usage doc
Guardfile
guard-depend can be adapted to all kind of projects.
.NET project
guard :depend,
# The path to the output generated by cmd. This can be a single value, an array or a callable returning any of both.
output_paths: Proc.new { Dir['build/bin/*.dll'] },
# The command to run if the output is outdated or does not exist.
cmd: %w(bundle exec rake compile),
# Whether to run at startup.
run_on_start: false do
watch(%r{^source/.*\.cs$}i)
end
Please read Guard doc for more information about the Guardfile DSL.
Development
- Source hosted at GitHub
- Report issues/Questions/Feature requests on GitHub Issues
Pull requests are very welcome! Make sure your patches are well tested. Please create a topic branch for every separate change you make.
Contributing
- Fork it (http://github.com/agross/guard-depend/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request