How can I run ts file through ts-node with global package installation? For example i have typescript applicaton which i want to publish, and use it as a global package.
In the package.json file there is a bin property, where we can specify the command for our executable file, which after installation will set into the PATH variable.
In the case of the .js file, there is no problem. You just need to specify the required file in bin.
After installation, scripts appear that launch our application using the command we specified in bin. Apparently from a screenshot, node.exe used our js. file as parameter
But how to do the same with ts. fille? I can run ts file using ts-node, which is installed in the local node_modules
But i can't do this with the bin property. The screenshot below causes an error.
Need link to executable file. But by itself ts. cannot be executed without ts-node.
Is it possible to specify in bin that ts. file need to pass ts-node? Or solve this problem without a global installation of ts-node?