27

I was looking over Typescript and was a bit confused about how you could build your js files from the ts files via the command line.

It implies in the documentation that you can do it easily through nodeJS, which would be great if I wanted a dependency on nodeJS... So is there any way to compile it via the command line without having nodeJS or visual studio?

This may seem crazy to some, but I would just put a build script step to output the javascript at the end if possible then package it into my release, as I tend to do most of my javascript development with RubyMine and don't want a dependency on nodeJS or Visual Studio for my build server.

2 Answers 2

17

If you install the TypeScript Tools without Visual Studio installed on the machine, tsc.exe and its dependencies will still get installed.

You can also just xcopy deploy tsc.exe (I don't have a definitive list of its dependencies, but it's pretty straightforward to figure out, or just copy everything that gets installed to the SDK folder) to a build server. The only thing unexpected you would need is msvcr110.dll, which you may or may not need to copy to tsc.exe's path.

Sign up to request clarification or add additional context in comments.

3 Comments

brilliant will see if I can extract that exe out of it and give it a whirl
Installed tools. Then searched my hard driver for tsc.exe and found under C:\Program Files (x86)\Microsoft SDKs\TypeScript\2.1
An alternative for linux users ?
6

The link in Ryan's answer is now heavily outdated and if you use it will generate a TS1005 error.

Here's what you want https://www.microsoft.com/en-us/download/details.aspx?id=55258 and it is still put in the same Program files x86 / Microsoft SDKs directory, and for me at least was not added to my path.

1 Comment

Your answer is also outdated.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.