diet-typescript ~master
Diet filter plugin for TypeScript.
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
DLang Vibe.d Diet Plugin for TypeScript
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.
- ~master released 9 years ago
- f/diet-typescript
- MIT
- Copyright © 2015 -, Fatih Kadir Akin
- Authors:
- Dependencies:
- vibe-d
- Versions:
-
~master 2015-Jan-18 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
192 downloads total
-
- Score:
- 1.2
- Short URL:
- diet-typescript.dub.pm