dgeni-alive
Version:
Live doc generator on top of Dgeni
40 lines (35 loc) • 732 B
JavaScript
;
module.exports = function generateConfigProcessor(log) {
var debug = log.debug;
var title = "";
var version = "";
var root = "api";
return {
title: function(t) {
title = t;
return this;
},
version: function(v) {
version = v;
return this;
},
rootArea: function(r) {
root = r;
return this;
},
$runBefore: ['rendering-docs'],
$process: function (docs) {
docs.push({
docType: 'config',
id: 'config',
template: 'app/data/config.template.js',
outputPath: 'data/config.js',
config: {
TITLE: title,
ROOT: root,
VERSION: version
}
});
}
};
};