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

jade-render-dynamic

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jade-render-dynamic

Enables support for dynamic render for Jade

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

jade-render-dynamic

Enables support for dynamic render for the Jade template engine

Installation

$ npm install jade-render-dynamic --save

Then init the module with path to your views dir.

var jadeRenderDynamic = require('jade-render-dynamic')('./templates');

Now you can use render method where you need

app.get('/', function(req, res){
    res.render('index.jade', jadeRenderDynamic.render(template_data));
});

where template_data is an object with locals, e.g.

{
    category: 'foo',
    name: 'bar'
}

Usage in templates

!= renderDynamic('{{category}}/{{name}}')

will include ./templates/foo/bar.jade with template_data object

Keywords

jade

FAQs

Package last updated on 21 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