There are times when you're using a Node module that can only be configured via JSON. When it comes to comments or setting up dynamic behavior, JSON falls flat. This will describe how (with some slight alterations) to get the best of both worlds.
The examples demonstrate settings for nodemon
within a monorepo.
- package.json - The
watch:server
command will first runconf.nodemon.js
and then start upnodemon
with the config that was generated. - conf.nodemon.js - Defines the configuration for the module with any logic that needs to be applied, then writes it out