Diem plugins syndication

toTypescriptPlugin

Microsoft's Typescript in your DIEM-Application!

Use Microsoft Typescript Javascript compiler in your DIEM-Application.

This supports syntax- and type-checking and some semantic sugar - included jQuery highlighting and completation!

Installation

  • In a console, from your project root dir, run:
git clone git://github.com/thehe/diem-toTypescriptPlugin.git plugins/toTypescriptPlugin  
  • In config/ProjectConfiguration.class.php, add toTypescriptPlugin to the list of enabled plugins:
class ProjectConfiguration extends dmProjectConfiguration
{  
  public function setup()  
  {  
    parent::setup();  
 
    $this->enablePlugins(array(  
      // your enabled plugins  
      'toTypescriptPlugin'  
    ));  
  • In a console, from your project root dir, run:
php symfony dm:setup  

Dependencies

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.

Configuration

Add this configuration in
apps/front/config/app.yml

all:  
    typescript:  
        # typescript-compiler executable  
        executable: tsc  

Usage

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.

Definition-Files

should just be added to the directory of .ts-file.
See https://github.com/borisyankov/DefinitelyTyped for a list of common ones.

    Add a comment

    Create an issue
    Impossible to fetch issues for this plugin.
    Impossible to get this plugin changelog.
    See more commits

    toTypescriptPlugin, created on September 29, 2013 by to-rparker, used by 0 projects

    Fork Diem on GitHub