I've been thinking about implementing another binary for running the package in development mode..
Ideally such a command will:
- Store the code generated by Babel in-memory
- Watch the project files and reload on change
I would go with implementing that with pm2 or nodemon and executing babel-node each time.
However, @mishguru/package binaries use programmatic hooks to tap into babel but babel-node does not have a programmatic interface (not an "official" one anyway)..
Possible solutions:
- I guess I can still use a module bundler like
webpack for this and use it's bindings with Babel but it seems as a bit of an overkill..
- I can use a bash script but that would be inconsistent with the rest of the library.
- I can require them
babel-node main module by requiring it directly (require('babel-node/src/babel-node')
Any ideas or suggestions are welcome [=
I've been thinking about implementing another binary for running the package in development mode..
Ideally such a command will:
I would go with implementing that with
pm2ornodemonand executingbabel-nodeeach time.However,
@mishguru/packagebinaries use programmatic hooks to tap intobabelbutbabel-nodedoes not have a programmatic interface (not an "official" one anyway)..Possible solutions:
webpackfor this and use it's bindings with Babel but it seems as a bit of an overkill..babel-nodemain module by requiring it directly (require('babel-node/src/babel-node')Any ideas or suggestions are welcome [=