Module: Middleman::CoreExtensions::FileWatcher
- Defined in:
- lib/middleman-core/core_extensions/file_watcher.rb
Defined Under Namespace
Modules: InstanceMethods Classes: API
Constant Summary collapse
- IGNORE_LIST =
[ /^\.bundle\//, /^vendor\//, /^\.sass-cache\//, /^\.git\//, /^\.gitignore$/, /\.DS_Store/, /^build\//, /^\.rbenv-.*$/, /^Gemfile$/, /^Gemfile\.lock$/, /~$/, /(^|\/)\.?#/, /^tmp\// ]
Class Method Summary collapse
-
.registered(app) ⇒ Object
(also: included)
Once registered.
Class Method Details
.registered(app) ⇒ Object Also known as: included
Once registered
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/middleman-core/core_extensions/file_watcher.rb', line 29 def registered(app) app.send :include, InstanceMethods app.config.define_setting :file_watcher_ignore, IGNORE_LIST, 'Regexes for paths that should be ignored when they change.' # Before parsing config, load the data/ directory app.before_configuration do files.reload_path(config[:data_dir]) end # After config, load everything else app.ready do files.reload_path('.') end end |