In my prior post I talked about how to compile all your typescript files down to a single .js file. One issue I did not mention was that if you are going to use this AND you have a build server you will need to setup the Typescript installer.
This can be done 2 ways.
- Install the Visual Studio 2012 plugin – But I hate having my ide on my build box so this is not my preferred approach
- Install the command line tools – This is my preferred approach.
How to get this installed on your build server?
- Open a command prompt and ensure you do not have the node package manager installed by typing npm, you should see something like
- If you do not have the npm installed head over to the download page to install it
- Once you have npm installed open up command prompt and install the typescript compiler using
npm install –g typescript
- now that you have typescript installed you should be able to type tsc on the command line and see below
Now that you have node and typescript installed you should be able to build your projects via your build server.
Till next time,
12-10-2012 6:05 AM