Skip to content
Filter mixin for jade using transformers
JavaScript
Latest commit d15225b May 10, 2014 @ForbesLindesay Merge pull request #1 from saggiyogesh/patch-1
SyntaxError: Unexpected token ;
Failed to load latest commit information.
.gitignore Initial commit Jan 7, 2013
LICENSE Add LICENSE Jul 26, 2013
README.md Initial commit Jan 7, 2013
include.jade Add include files Jan 7, 2013
include.js Add include files Jan 7, 2013
index.js SyntaxError: Unexpected token ; May 9, 2014
package.json Add LICENSE Jul 27, 2013
sample.js Initial commit Jan 7, 2013
temp.html Initial commit Jan 7, 2013
temp.jade Initial commit Jan 7, 2013
temp.md Initial commit Jan 7, 2013

README.md

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
Something went wrong with that request. Please try again.