The TypeScript compiler is built in TypeScript, & hence is available as a JS tệp tin (tsc.js) that can be run using just about any ES3-compiliant VM or JS implementation.
That said, the compiler"s current file I/O infrastructure only supports Node & Windows Scripting Host file APIs. If you"d like to lớn recommkết thúc for support for another environment, feel không lấy phí lớn reach out to the team at our GitHub site (Formerly CodePlex)
Short version: use Node if you can. It"s becoming unavoidable nowadays.
Bạn đang xem: Understanding typescript's “compilation process” & the
Maybe it"s not the answer you want, but as everybody mentioned, the compiler is a JS tệp tin, so, your options are the options of executing a JS tệp tin.
In Windows, there are 2 obvious ones, Node, & Windows Script Host.
You know about node already, the other option is a component that comes with all versions of Windows (I think), you can bởi vì it lượt thích this:
cscript path/to/tsc.js source-file.tsYou can see all compiler options by just:
cscript path/to/tsc.jsOn Linux I assume you should be able khổng lồ use (in addition lớn node):V8 standalone shell, replace node or cscript with v8-shellAny other JS runner available on the selected platform (another answer mentioned Rhino for example)
Update: Another answer suggests the compiler API is only compatible with node & Windows Script Host (cscript tool), so, if correct, then on Linux you"ll need Node khổng lồ compile TypeScript.
If you are looking for something like apt get tsc (or whatever the Linux/Mac package managers are like), I think there isn"t.
I rethành viên reading somewhere that the I/O is optimized for Node & Windows Script Host, so, if you have sầu problems with options, you"ll probably over up with Node if seeking platkhung independence.