view-cards combines webpack dev server, hot module replacement, and devboard to show your devcards with minimal configuration. Just place files called
*.card.js in your project and they will be included on the devboard.
npm install -g view-cards
view-cards in the root of the project for which you would like to view cards.
card-config.js goes in your project root. It can export the following:
This is a function that takes as input the webpack config that view-cards uses and can transform it into a new config that works with your devcards. This is where you can add loader configurations, resolve.extensions, and any necessary plugins.
x => x
The directory that contains all your devcards. Defaults to
A regular expression that is used to match your card file names. Defaults to
An array of URIs to stylesheets that will be added to
<head> in the the template rendered by express.
A path relative to
process.cwd() that will be the public assets directory for the devcard server.
Path to the favicon used for the devcard server. Defaults to favicon.ico in the project director if present, otherwise uses view-cards's built-in "hand of cards" favicon.