New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

jade-babel

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jade-babel

Simple module which adds a babel (ES6 to ES5) filter to jade.

latest
Source
npmnpm
Version
5.0.0
Version published
Weekly downloads
284
8.4%
Maintainers
2
Weekly downloads
 
Created
Source

#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();

FAQs

Package last updated on 02 Apr 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts