Use Microsoft Typescript Javascript compiler in your DIEM-Application.
This supports syntax- and type-checking and some semantic sugar - included jQuery highlighting and completation!
git clone git://github.com/thehe/diem-toTypescriptPlugin.git plugins/toTypescriptPlugin
class ProjectConfiguration extends dmProjectConfiguration { public function setup() { parent::setup(); $this->enablePlugins(array( // your enabled plugins 'toTypescriptPlugin' ));
php symfony dm:setup
Install Microsoft Typescript Preview on the webserver - see http://www.typescriptlang.org/#Download for details.
Make tsc
executable by the webserver and (if it is not in %PATH%
) change the name and path in app.yml
.
Add this configuration in
apps/front/config/app.yml
all:
typescript:
# typescript-compiler executable
executable: tsc
Simply put your typescript file(s) in view.yml (eg. apps/front/config/view.yml) like
default:
http_metas:
content-type: text/html
stylesheets:
- layout
- main
- markdown
javascripts:
- hello.ts
- front
has_layout: true
layout: layout
In the example above, the file hello.ts will be automatically compiled to hello.ts.js and included instead of the .ts-file.
should just be added to the directory of .ts-file.
See https://github.com/borisyankov/DefinitelyTyped for a list of common ones.
toTypescriptPlugin, created on September 29, 2013 by to-rparker, used by 0 projects