This Question is Answered

2 "helpful" answers available (2 pts)
2 Replies Last post: Feb 23, 2013 6:06 PM by Francesco Maida  
Francesco Maida Newbie 21 posts since
Mar 28, 2011
Currently Being Moderated

Feb 23, 2013 1:17 PM

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 http://www.typescriptlang.org : 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:

http://blog.jetbrains.com/webide/2013/01/webstorm-6-sneak-peek-typescript-background-tasks-and-sourcemaps/

 

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

Andriy Bazanov Master 4,194 posts since
May 28, 2010
Currently Being Moderated
Feb 23, 2013 4:08 PM in response to: Francesco Maida
Re: How to compile TypeScript from within PHPStorm ?

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.

More Like This

  • Retrieving data ...