我想在Brackets代码编辑器中编写TypeScript和CoffeeScript,但我遇到了困难。如何将其编译为vanilla js?如何在html页面中引用它?
答案 0 :(得分:10)
您需要brackets-typescript
插件:https://github.com/fdecampredon/brackets-typescript
您可以使用grunt为您执行此操作:https://github.com/grunt-ts/grunt-ts。只要将文件保存在括号(或任何其他编辑器)中,它就可以编译项目。输出是JavaScript
如果您刚开始使用JavaScript,则指向生成的JS,其中包含正常的script
标记。
或者,您可以使用RequireJS http://requirejs.org/
之类的内容