guide201
Version:
Atlas is living style-guides & pattern library static site generator with extensive CSS monitoring and components info that could be used virtually with any scss/css project
25 lines (20 loc) • 850 B
JavaScript
;
module.exports = function init(projectInfo, subPages) {
const inline = require('./templateHelpers/inline.js');
const pluralize = require('./templateHelpers/pluralize.js');
const View = function(config) {
this.projectInfo = {
name: projectInfo.name,
version: projectInfo.version
};
this.title = config.title;
this.content = config.content;
this.type = config.type;
this.icon = config.icon; // Icon in page header
this.isDeprecated = config.isDeprecated;
this.subPages = subPages.subPages; // Aside navigation pages tree
};
View.prototype.inline = () => (text, render) => inline(text, render);
View.prototype.pluralize = () => (text, render) => pluralize(text, render);
return { view: config => new View(config) };
};