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:servercommand will first runconf.nodemon.jsand then start upnodemonwith 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