Lines Matching refs:load

1 # pug-load
5 … Status](https://img.shields.io/travis/pugjs/pug-load/master.svg)](https://travis-ci.org/pugjs/pug…
6 …dm.org/pugjs/pug/status.svg?path=packages/pug-load)](https://david-dm.org/pugjs/pug?path=packages/…
7 …rg/pugjs/pug/dev-status.svg?path=packages/pug-load)](https://david-dm.org/pugjs/pug?path=packages/…
8 [![NPM version](https://img.shields.io/npm/v/pug-load.svg)](https://www.npmjs.org/package/pug-load)
9 …s](https://img.shields.io/codecov/c/github/pugjs/pug-load.svg)](https://codecov.io/gh/pugjs/pug-lo…
13 npm install pug-load
18 var load = require('pug-load');
21 ### `load(ast, options)`
22 ### `load.string(str, filename, options)`
23 ### `load.file(filename, options)`
25 Loads all dependencies of the Pug AST. `load.string` and `load.file` are syntactic sugar that parse…
31 - `resolve` (function): a function used to override `load.resolve`. Defaults to `load.resolve`.
32 - `read` (function): a function used to override `load.read`. Defaults to `load.read`.
35 The `options` object is passed to `load.resolve` and `load.read`, or equivalently `options.resolve`…
37 ### `load.resolve(filename, source, options)`
39 Callback used by `pug-load` to resolve the full path of an included or extended file given the path…
43 This function is not meant to be called from outside of `pug-load`, but rather for you to override.
45 ### `load.read(filename, options)`
47 Callback used by `pug-load` to return the contents of a file.
51 This function is not meant to be called from outside of `pug-load`, but rather for you to override.
53 ### `load.validateOptions(options)`
55 Callback used `pug-load` to ensure the options object is valid. If your overriden `load.resolve` or…
57 This function is not meant to be called from outside of `pug-load`, but rather for you to override.
65 var load = require('pug-load');
70 var ast = load(parse(lex(str, 'bar.pug'), 'bar.pug'), {
75 return load.resolve(filename, source, options);
82 var ast = load.string(str, 'bar.pug', {
87 return load.resolve(filename, source, options);
93 var ast = load.file('bar.pug', {
98 return load.resolve(filename, source, options);