I'm getting into TypeScript as a way to write simple utility programs, meant to be run on the command line. There are a bunch of basic questions I have, maybe someone can give me pointers.
- I am assuming that I will run the app by a command like:
$ node myapp.js - If I want to run it by
$ myapp.jsI need a shebang line in the js, but I can't see how to have that flow from the .ts file, so I have to post edit the js file, right? - How do I just open a text file from a local path within TypeScript? Where do I look for the right incantation?
- And once I have the text file open I have to process it as a cvs. I found a library called node-cvs but I am not sure how to connect the dots.