Nitro Component Catalog Plugin
This plugin allows you to navigate and preview all your components.
Example preview
Installation
npm i --save-dev nitro-component-catalog
Integration into nitro
Place the following configuration file to your projects/routes/pattern-catalog.js
component-catalog.js
var nitroPatternNavigation = require('@namics/nitro-component-catalog');
var path = require('path');
module.exports = function(app) {
app.use('/', nitroComponentCatalog({
root: path.resolve(__dirname, '../../components'),
componentView: 'component',
exampleView: 'example',
exampleCodeView: 'code',
examplePartial: '_partials/example',
navigationView: 'navigation',
viewData: app.locals,
pageTitle: 'Pattern library',
webpackApp: webpack(webpackConfig),
nitroComponentResolver: new NitroComponentResolver(),
nitroComponentValidator: new NitroComponentValidator(),
}));
};