jade-babel

Jade plugin for Babel

Showing:

Popularity

Downloads/wk

11

GitHub Stars

39

Maintenance

Last Commit

6yrs ago

Contributors

1

Package

Dependencies

1

Size (min+gzip)

242.3KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

#Jade-babel

This is a simple module which adds a babel (ES6 to ES5) filter to jade.

##Installation

$ npm install jade-babel

##Usage

var jade = require('jade');
var babel = require('jade-babel');

jade.filters.babel = babel({});

OR

var jade = require('jade');
var babel = require('jade-babel');

jade = babel({}, jade);

Now you can use ES6 in your jade templates as following.

script
    :babel
        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();

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100