Nine Pedestrians Mesmerized
Have opinions about JavaScript? We want to hear them. Take the 2018 JavaScript Ecosystem Survey »

jade-traceur

0.0.3 • Public • Published

JADE-TRACEUR

This is a simple module which adds a traceur filter to jade.

Usage example:

var jade = require('jade');
var jadeTraceur = require('jade-traceur');
 
jade.filters.traceur = jadeTraceur({experimental: true});

OR

var jade = require('jade');
var jadeTraceur = require('jade-traceur');
 
jade = jadeTraceur({experimental: true}, jade);

and then

script(src="traceur-runtime.js")
script
    :traceur
        console.log('Hello World !!!');
        class Person{
            constructor(name){
                this.name = name;
            }
            sayName(){
                console.log(`Hello, my name is ${this.name}`);
            }
        }
        var pers = new Person('Apoxx');
        pers.sayName();

Keywords

none

install

npm i jade-traceur

Downloadsweekly downloads

7

version

0.0.3

license

MIT

last publish

collaborators

  • avatar
Report a vulnerability