🚀 Launch Week Day 5:Introducing Immutable Scans.Learn More →
Socket
Book a DemoInstallSign in
Socket

jade-filter

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jade-filter

Filter mixin for jade using transformers

latest
Source
npmnpm
Version
1.0.4
Version published
Maintainers
1
Created
Source

jade-filter

Filter mixin for jade using transformers

This module over-rides the compiler for jade so that you get completely re-vamped filter support built on top of mixins. You can use any of the filters in transformers. Note that to use any of these transformations you must also have the corresponding library installed.

API

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

jade.renderFile('path/to/file.jade', filter(optionsAndLocals), function (err, res) {
  //res
});

Examples

Render some markdown inline

+filter('markdown').
  # Heading 1

  Hello from some **markdown**.

Render some markdown from a file

+filter('markdown')
  include path/to/markdown.md

Minify some coffee-script

The following example will compile the coffee-script to JavaScript, then minify it and wrap it in the propper script tags.

+filter('uglify')
  +filter('coffee').
    value = 42

FAQs

Package last updated on 08 Jan 2013

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