jade-filter

Filter mixin for jade using transformers

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.

var jade = require('jade');
var filter = require('jade-filter');
 
jade.renderFile('path/to/file.jade', filter(optionsAndLocals), function (errres) {
  //res 
});
+filter('markdown').
  # Heading 1
 
  Hello from some **markdown**.
+filter('markdown')
  include path/to/markdown.md

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