mirror of
https://github.com/documentationjs/documentation.git
synced 2026-01-18 14:17:30 +00:00
Robertleeplummerjr master (#476)
* Expose imports between templates Exposes `renderSectionList`, and `renderSection` & `renderNote` for consistency. Fixes #462 * Fixes #440 Resolve typo * Resolve variable name conflict * Change formatters to master
This commit is contained in:
parent
b83bc2eff6
commit
f00c7bd153
@ -71,21 +71,12 @@ module.exports = function (comments, options, callback) {
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
sharedImports.imports.renderSectionList = _.template(fs.readFileSync(path.join(__dirname, 'section_list._'), 'utf8'), sharedImports);
|
||||
sharedImports.imports.renderSection = _.template(fs.readFileSync(path.join(__dirname, 'section._'), 'utf8'), sharedImports);
|
||||
sharedImports.imports.renderNote = _.template(fs.readFileSync(path.join(__dirname, 'note._'), 'utf8'), sharedImports);
|
||||
|
||||
var pageTemplate = _.template(
|
||||
fs.readFileSync(path.join(__dirname, 'index._'), 'utf8'), {
|
||||
imports: _.assign({}, sharedImports.imports, {
|
||||
renderSection: _.template(
|
||||
fs.readFileSync(path.join(__dirname, 'section._'), 'utf8'),
|
||||
sharedImports),
|
||||
renderNote: _.template(
|
||||
fs.readFileSync(path.join(__dirname, 'note._'), 'utf8'),
|
||||
sharedImports),
|
||||
renderSectionList: _.template(
|
||||
fs.readFileSync(path.join(__dirname, 'section_list._'), 'utf8'),
|
||||
sharedImports)
|
||||
})
|
||||
});
|
||||
var pageTemplate = _.template(fs.readFileSync(path.join(__dirname, 'index._'), 'utf8'), sharedImports);
|
||||
|
||||
// push assets into the pipeline as well.
|
||||
vfs.src([__dirname + '/assets/**'], { base: __dirname })
|
||||
|
||||
@ -67,7 +67,7 @@ function LinkerStack(config) {
|
||||
* path.
|
||||
*
|
||||
* @param {Array<Object>} comments a list of comments
|
||||
* @param {Function} a method that turns a namespace into a URL
|
||||
* @param {Function} resolver a method that turns a namespace into a URL
|
||||
* @returns {LinkerStack} returns this
|
||||
* @private
|
||||
* @example
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user