UNPKG

atlas-guide

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

24 lines (19 loc) 817 B
'use strict'; 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; // 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) }; };