marko-js-archive / marko-starter

MIT License
30 stars 8 forks source link

auto install modules #8

Open mlrawlings opened 7 years ago

mlrawlings commented 7 years ago

I'm playing with the idea of monkeypatching require in development and when trying to require a path that isn't available, it checks to see if it might be an npm path and if so, attempts to download the package from npm.

I have this almost working, but there's some stat caching in the internal module system, so it is not picking up the newly installed module.

Does this seem like a good idea? It would allow the developer to not have to stop the server when they need to install a new module.