How to make a shell executable node file using TypeScript

前端 未结 7 1921
日久生厌
日久生厌 2021-02-05 05:56

Normally in node files I just put

#!/usr/bin/env node 

at the top and make it executable to create a file that can be run from a bash terminal.

相关标签:
7条回答
  • 2021-02-05 07:00

    As of ts-node v8.9.0 it seems like the recommended way to do this is with the following:

    #!/usr/bin/env ts-node-script
    
    0 讨论(0)
提交回复
热议问题