Looking for changes on website content https://projet-alice-demo.herokuapp.com/diffs/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
2.8KB

  1. # A sample Guardfile
  2. # More info at https://github.com/guard/guard#readme
  3. ## Uncomment and set this to only include directories you want to watch
  4. # directories %w(app lib config test spec features) \
  5. # .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")}
  6. ## Note: if you are using the `directories` clause above and you are not
  7. ## watching the project directory ('.'), then you will want to move
  8. ## the Guardfile to a watched dir and symlink it back, e.g.
  9. #
  10. # $ mkdir config
  11. # $ mv Guardfile config/
  12. # $ ln -s config/Guardfile .
  13. #
  14. # and, you'll have to watch "config/Guardfile" instead of "Guardfile"
  15. guard 'livereload' do
  16. extensions = {
  17. css: :css,
  18. scss: :css,
  19. sass: :css,
  20. js: :js,
  21. coffee: :js,
  22. html: :html,
  23. png: :png,
  24. gif: :gif,
  25. jpg: :jpg,
  26. jpeg: :jpeg,
  27. # less: :less, # uncomment if you want LESS stylesheets done in browser
  28. }
  29. rails_view_exts = %w(erb haml slim)
  30. # file types LiveReload may optimize refresh for
  31. compiled_exts = extensions.values.uniq
  32. watch(%r{public/.+\.(#{compiled_exts * '|'})})
  33. extensions.each do |ext, type|
  34. watch(%r{
  35. (?:app|vendor)
  36. (?:/assets/\w+/(?<path>[^.]+) # path+base without extension
  37. (?<ext>\.#{ext})) # matching extension (must be first encountered)
  38. (?:\.\w+|$) # other extensions
  39. }x) do |m|
  40. path = m[1]
  41. "/assets/#{path}.#{type}"
  42. end
  43. end
  44. # file needing a full reload of the page anyway
  45. watch(%r{app/views/.+\.(#{rails_view_exts * '|'})$})
  46. watch(%r{app/helpers/.+\.rb})
  47. watch(%r{config/locales/.+\.yml})
  48. end
  49. # Guard-Rails supports a lot options with default values:
  50. # daemon: false # runs the server as a daemon.
  51. # debugger: false # enable ruby-debug gem.
  52. # environment: 'development' # changes server environment.
  53. # force_run: false # kills any process that's holding the listen port before attempting to (re)start Rails.
  54. # pid_file: 'tmp/pids/[RAILS_ENV].pid' # specify your pid_file.
  55. # host: 'localhost' # server hostname.
  56. # port: 3000 # server port number.
  57. # root: '/spec/dummy' # Rails' root path.
  58. # server: thin # webserver engine.
  59. # start_on_start: true # will start the server when starting Guard.
  60. # timeout: 30 # waits untill restarting the Rails server, in seconds.
  61. # zeus_plan: server # custom plan in zeus, only works with `zeus: true`.
  62. # zeus: false # enables zeus gem.
  63. # CLI: 'rails server' # customizes runner command. Omits all options except `pid_file`!
  64. guard 'rails' do
  65. watch('Gemfile.lock')
  66. watch(%r{^(config|lib)/.*})
  67. end