bhauman / lein-figwheel

Figwheel builds your ClojureScript code and hot loads it into the browser as you are coding!
Eclipse Public License 1.0
2.88k stars 210 forks source link

Allow `:hawk-options` to take `:sensitivity` config. #740

Closed johanmynhardt closed 4 years ago

johanmynhardt commented 4 years ago

When trying to use the config:

  :hawk-options {:watcher :polling :sensitivity :low}

the following error is produced:

...
------ Figwheel Configuration Error ------

Error at [:figwheel :hawk-options :sensitivity 0]
The key :sensitivity at (:figwheel :hawk-options) does not conform.
It should satisfy #{:watcher}

-- Docs for key :hawk-options --
If you need to watch files with polling instead of FS events. This can
be useful for certain docker environments.

  :hawk-options {:watcher :polling}
...

The schema spec is only checking :watcher with possible values #{:barbary :java :polling}

This change allows specifying :sensitivity with it's possible values #{:low :medium :high} as well.