Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add development mode #9

Open
Paveltarno opened this issue Sep 25, 2018 · 2 comments
Open

Add development mode #9

Paveltarno opened this issue Sep 25, 2018 · 2 comments

Comments

@Paveltarno
Copy link
Contributor

I've been thinking about implementing another binary for running the package in development mode..
Ideally such a command will:

  1. Store the code generated by Babel in-memory
  2. 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:

  1. 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..
  2. I can use a bash script but that would be inconsistent with the rest of the library.
  3. I can require them babel-node main module by requiring it directly (require('babel-node/src/babel-node')

Any ideas or suggestions are welcome [=

@stayradiated
Copy link
Contributor

@Paveltarno Would this be similar to babel --watch?

@Paveltarno
Copy link
Contributor Author

Paveltarno commented Sep 26, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants