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
I've been looking at #44 and I noticed that one of the things you want to do is make it fast and production-ready. I'm really excited about this, but I realize that a lot of time is involved in a rewrite and that I can't realistically expect this to be done in the near future (although I'd be happy to help).
I'm working on a tool called node-script (https://github.com/joeskeen/node-script), which allows you to create self-contained Node scripts (not requiring a package.json file or running npm install first). One of the big things I'm in the process of tackling before v1.0 is transpiler support. I'm currently using the interpret module to determine which packages are required to register the script file. Currently ts-node is first in line for the ts file extension, so that is the one that node-script calls upon to run TypeScript node-scripts. The issue comes when I copy the script file to another location to run it in isolation. Removed from its home during development, the script's /// <reference /> comments and other typing resolution no longer resolves. Since interpret points me directly to require('ts-node/register'), I can't call require('ts-node').register({options}) without making a special case.
If ts-node's register function was able to pick up whether to disableWarnings from process.env or something similar, I could make sure that that is set before require('ts-node/register') is called.
I think that this could be a good workaround until the new production-ready version of ts-node is ready.
The text was updated successfully, but these errors were encountered:
I've been looking at #44 and I noticed that one of the things you want to do is make it fast and production-ready. I'm really excited about this, but I realize that a lot of time is involved in a rewrite and that I can't realistically expect this to be done in the near future (although I'd be happy to help).
I'm working on a tool called
node-script
(https://github.com/joeskeen/node-script), which allows you to create self-contained Node scripts (not requiring a package.json file or runningnpm install
first). One of the big things I'm in the process of tackling before v1.0 is transpiler support. I'm currently using theinterpret
module to determine which packages are required to register the script file. Currentlyts-node
is first in line for thets
file extension, so that is the one thatnode-script
calls upon to run TypeScriptnode-script
s. The issue comes when I copy the script file to another location to run it in isolation. Removed from its home during development, the script's/// <reference />
comments and other typing resolution no longer resolves. Sinceinterpret
points me directly torequire('ts-node/register')
, I can't callrequire('ts-node').register({options})
without making a special case.If
ts-node
'sregister
function was able to pick up whether todisableWarnings
fromprocess.env
or something similar, I could make sure that that is set beforerequire('ts-node/register')
is called.I think that this could be a good workaround until the new production-ready version of
ts-node
is ready.The text was updated successfully, but these errors were encountered: