Package Exports
- pug-loader
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (pug-loader) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
jade-load
The jade loader is responsible for loading the depenendencies of a given jade file. It adds fullPath and str properties to every Include and Extends node. It also adds an ast property to any Include nodes that are loading jade and any Extends nodes. It then recursively loads the dependencies of any of those included files.
Installation
npm install jade-loadUsage
var fs = require('fs');
var lex = require('jade-lexer');
var parse = require('jade-parser');
var load = require('jade-load');
// you can do everything very manually
var str = fs.readFileSync('bar.jade', 'utf8');
var ast = load(parse(lex(str, 'bar.jade'), 'bar.jade'), {
lex: lex,
parse: parse
});
// or you can do all that in just two steps
var str = fs.readFileSync('bar.jade', 'utf8');
var ast = load.string(str, 'bar.jade', {
lex: lex,
parse: parse
});
// or you can do all that in only one step
var ast = load.file('bar.jade', {
lex: lex,
parse: parse
});License
MIT