5 ms·
Genuinely curious. Does anyone use the command line `tsc` to compile typescript in everyday work? Or is it more of just a learning stepping stone?
by Waterluvian 8y ago
Genuinely curious. Does anyone use the command line `tsc` to compile typescript in everyday work? Or is it more of just a learning stepping stone?
- smt88 8y agoDepends on your IDE. In practice, tsc is a build step in CI/CD, not a dev tool (if you’re using a good IDE).
- tyingq 8y agoI use cc instead of make, and javac instead of Gradle fairly often for various purposes like debugging or experimenting. Is the js world different?
- tuan 8y agoin a project I worked on, we used tsc with msbuild to build our frontend.
- mewciv 8y agoI use tsc -w, what do you use? I'm not using it on the frontend but for nodejs (i would use webpack on the frontend)
- tom_ 8y agoWith the disclaimer that I don't get paid for my Typescript work (I use it for some personal projects, as it saves me a bit of time compared to C++), I have this as the compile scripts entry in my package.json: "compile": "tsc -p ./tsconfig.json", I also have a start script, for running it from the command line: "start": "npm run compile && node ./.build/main.js" tsc has some kind of file-watching mode, that I assume compiles when you save stuff, but I don't use that, because I'm not a monster.
- sehugg 8y agoI use tsc -w with a simple Python web server and use <script> tags to include all of my modules. Yeah, I'm a monster. And watch out for the browser cache.
- ludlu 8y agoFor node projects I use ts-node with nodemon watching for filechanges and takes care of restarting the server. And then to build the project for release thats done with tsc.
- itslennysfault 8y agoYes. ts-node is great for development, but for deployment (in our ci/cd) we run tsc to compile the typescript down to javascript.
- dvlsg 8y agoYeah, we use tsc for node. I typically just use ts-node for development, though, and tsc gets to hang out in CI/CD somewhere. I assume ts-node / webpack / etc all use tsc under the hood, though.