view-engine-jade
Jade view engine
Installation
npm install view-engine-jade --save
Usage
Enable the Jade view engine:
;
The Jade view engine is now ready to be used elsewhere in your code (either client-side or server-side):
var templatePath = require;var template = ; // Callback-styletemplate; // Streaming-stylevar out = ;template; // Render to an existing render contexttemplate;
It is recommended to use the RaptorJS Optimizer as the JavaScript bundler, along with the optimizer-jade plugin.
The client-side loader expects the Jade templates to be compiled to a CommonJS module and transported down to the client as code similar to the following:
module { return { return /* compiled source produced by jade.compileClient(...) */; };};
See the documentation for the view-engine module for more information.