Created
February 18, 2017 16:43
-
-
Save HK49/7e73a8d3c99f2409e17718d424f3d0bc to your computer and use it in GitHub Desktop.
exemplary guardfile
This file contains 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
# A sample Guardfile | |
# More info at https://github.com/guard/guard#readme | |
## Uncomment and set this to only include directories you want to watch | |
# directories %w(app lib config test spec features) \ | |
# .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")} | |
## Note: if you are using the `directories` clause above and you are not | |
## watching the project directory ('.'), then you will want to move | |
## the Guardfile to a watched dir and symlink it back, e.g. | |
# | |
# $ mkdir config | |
# $ mv Guardfile config/ | |
# $ ln -s config/Guardfile . | |
# | |
# and, you'll have to watch "config/Guardfile" instead of "Guardfile" | |
UI.options.merge!(flush_seconds: 0, level: :debug, device: 'log/guard.log') | |
notification :off | |
# tail -f log/guard.log | |
# bundle exec guard | |
guard :bundler do | |
require 'guard/bundler' | |
require 'guard/bundler/verify' | |
helper = Guard::Bundler::Verify.new | |
files = ['Gemfile'] | |
files += Dir['*.gemspec'] if files.any? { |f| helper.uses_gemspec?(f) } | |
# Assume files are symlinked from somewhere | |
files.each { |file| watch(helper.real_path(file)) } | |
end | |
# guard 'livereload', port: '8080', host: 'junior-billy-bonka.c9users.io' do | |
# watch(%r{app/views/.+\.(erb|haml|slim)}) | |
# watch(%r{app/helpers/.+\.rb}) | |
# watch(%r{public/.+\.(css|js|html)}) | |
# watch(%r{config/locales/.+\.yml}) | |
# # Rails Assets Pipeline | |
# watch(%r{(app|vendor)(/assets/\w+/(.+\.(css|js|html))).*}) { |m| "/assets/#{m[3]}" } | |
# end | |
guard 'puma', :port => 8080, :control_port => 8082 do | |
watch('Gemfile.lock') | |
watch(%r{^config|lib|api/.*}) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment