-
First, install Flashdevelop and make sure to select Install JS Compiler.
-
Then install NodeJS which conveniently installs both Node.JS and its package manager NPM.
-
Finally, open a command line prompt (the shortcut is Windows + R) and run
npm install -g typescript
.
-
Go to
Project
→New Project
→TypeScript App
and set the project name and folder, which creates two folderssrc
(for the typescript sources) andbin
for the javascript output and HTML page. -
Now go to
Project
→Project Properties
→Build
and set the Post-Build Command Line tojava -jar "$(ToolsDir)\google\compiler.jar" --js "bin/YourAppName.js" --js_output_file "bin/YourAppName.min.js"
. That way, it generates bothYourAppName.js
andYourAppName.min.js
in the bin folder when you build or test. -
And finally, open
index.html
and change the script src toYourAppName.min.js
instead ofYourAppName.js
.