You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there, thanks for maintaining this awesome tool. It's a great way to reduce recompile times.
I'm trying to do something a little out of the ordinary. I'd like to have my dev server and my tests share the same in-memory ts-node compiler so I can quickly switch between running tests and playing with my dev server while making changes to my source files.
I'd also like to reuse ts-node-dev because you've already solved the main problem of hooking into require for transpilation and file watching. I believe I can achieve this by making it possible for ts-node-dev clean up after itself via a programmatic API.
What I mean is this:
const start = require("ts-node-dev/lib/index.js")
let dispose = start("my-server.ts");
...
dispose(); // filewatcher and child process get killed, but ts-node compiler sticks around
dispose = start("my-tests.ts"); // second `start()` call doesn't re-init compiler
...
dispose();
What do you think? If you're okay with this functionality, I can open a PR. Thanks!
The text was updated successfully, but these errors were encountered:
bywo
linked a pull request
Jan 24, 2019
that will
close
this issue
Hi there, thanks for maintaining this awesome tool. It's a great way to reduce recompile times.
I'm trying to do something a little out of the ordinary. I'd like to have my dev server and my tests share the same in-memory ts-node compiler so I can quickly switch between running tests and playing with my dev server while making changes to my source files.
I'd also like to reuse
ts-node-dev
because you've already solved the main problem of hooking intorequire
for transpilation and file watching. I believe I can achieve this by making it possible forts-node-dev
clean up after itself via a programmatic API.What I mean is this:
What do you think? If you're okay with this functionality, I can open a PR. Thanks!
The text was updated successfully, but these errors were encountered: