How to compile TypeScript from within PHPStorm ?

Hello, some days ago I saw a presentation of TypeScript and I was impressed. I have a Mac with OS X 10.8.2 installed and PHPStorm EAP-126.339 (the latest EAP release so far), and since I already installed node.js before I've installed the Typescript compiler by following the instructions available on : from my terminal I wrote "sudo npm install -g typescript" and it worked.

I'm actually trying to convince PHPStorm to compile TypeScript on-the-fly as you can see in the video on this JetBrains blog article:

Essentially, as you can see in that video I'd like to write some TypeScript code, save it and have PHPStorm automatically compiling it into Javascript.

Please, could you tell me if it's already possible to try this feature on PHPStorm? And if it's possible, how do I achieve that result ?
What I have to configure inside PHPStorm in order to obtain the same behaviour?

Thank you very much and best regards


Hi Francesco,

Install File Watchers plugin.

When you open any TypeScript file for a first time, IDE will prompt you to setup automatic compilation (as shown on that video). If for some reason it will not do that -- then you can do it via "Preferences | File Watchers" manually.


Thank you very much for your help, it worked :)


Please sign in to leave a comment.