`--watch` fix and BABEL_WATCH_NODE_OPTIONS
This release fixes two issues:
- #98: There wasn't a good way to reliably pass NODE_OPTIONS to the child. If you use
NODE_OPTIONS
, it will apply both to thebabel-watch
parent instance and to the child (your code), causing issues with options like--inspect
. Therefore, I have addedBABEL_WATCH_NODE_OPTIONS
, which will be ignored by the parent and passed on to the child like you'd expect. In 99.9% of cases, this is what you want.- See the README for more details.
- #120: It appears the
--watch
option (i.e.babel-watch --watch interfaces/ app.js
) didn't actually do anything very useful. It would add the folder to be watched by chokidar, but because it wasn't required by the application,babel-watch
would simply execute no action on a modification. This is not intended so that logic has been removed, and you can now watch arbitrary folders and restart on them.- Just be sure to add to
--extensions
if the files you're watching don't end in.js
. - If you need to exclude a path, use
--exclude
. Be careful not to use--ignore
, which is instead passed tobabel
. In a later release I will rename this because it's confusing. - See the README for all options.
- Just be sure to add to