diet-typescript ~master

Diet filter plugin for TypeScript.


To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

DLang Vibe.d Diet Plugin for TypeScript

Screenshot

Compiles TypeScript in Diet templates to JavaScript and caches the result.

Usage

To register the plugin you have to import diet_typescript; in your application.

import vibe.d;
import diet_typescript;

//...

void hello(HTTPServerRequest req, HTTPServerResponse res)
{
    res.render!"typescript.dt"();
}

Now you can use the :typescript textfilter in your diet files.

doctype html
html
  head
    title Hello, TypeScript
  body
    :typescript
      class HelloWorld {
        constructor(id: number, name: string) {
           console.log("Hello world!");
        }
      }

      var typing = new TypeCheckDemo("hello", 1);

See example for a complete vibe.d app.

Authors: Fatih Kadir Akin, Martin Nowak

Dependencies: vibe-d

Versions:
~master 2015-Jan-18
Show all 1 versions
Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 178 downloads total