How do I build the TypeScript compiler (at typescript.codeplex.com) from source? When I clone it from git I see a Makefile, but make in cygwin fails with *** missing separator (did you mean TAB instead of 8 spaces?)
I can't find any clear documentation, and the Readme file in the source doesn't help.
To use the makefile with mingw32 or cygwin make, you need to go trough the file and fix the indentation.
sed -i.bak -e "s/^[[:space:]]\+/ /" Makefile
To get it to compile, you can issue this command:
make TYPESCRIPT_HOST="cscript //Nologo" compiler
This also works with nmake
.
The Makefile in the TypeScript source is in NMAKE format and has dependencies on Windows commands. NMAKE comes with Visual Studio and is in the path when you run a Visual Studio Command Prompt.
In order to build you need both nmake and nodejs in your path. Then just run:
nmake TYPESCRIPT_HOST=node world
from the directory containing your TypeScript source. The built .js
files will be placed in built\local
Edit: Added the missing arg setting TYPESCRIPT_HOST
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With