Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to write TypeScript and CoffeeScript in Brackets? [closed]

I want to write TypeScript and CoffeeScript in the Brackets code editor, but I am having difficulties. How do I compile it to vanilla js? How to refer it in the html page?

like image 205
user3793458 Avatar asked Jul 01 '14 10:07

user3793458


1 Answers

For TypeScript

intellisence / syntax highlighting / live error checking

You need the brackets-typescript plugin : https://github.com/fdecampredon/brackets-typescript

Compile to vanilla JS

You can use grunt to do that for you : https://github.com/grunt-ts/grunt-ts. It can compile your project whenever you save a file in brackets (or any other editor). The output is JavaScript

How to refer it in the html page

You point to the generated JS with a normal script tag as you do if you were just using JavaScript to begin with.

Alternatively you can use something like RequireJS http://requirejs.org/

like image 71
basarat Avatar answered Sep 22 '22 10:09

basarat