@irvingjs/styleguide

6.1.0 • Public • Published

React Styleguidist for Irving.

This package contains an integration for React Styleguidist with Irving. All core components will

Installation

  1. npm install @irvingjs/styleguide
  2. Create a config/styleguide.config.js file to act as an entry point for your styleguide. This file should import createStyleguideConfig from '@irvingjs/styleguide' and use that function to generate the config. You may pass in any number of additional configs to be merged into the base config, including configs from Irving packages. Example:
import createStyleguideConfig from '@irvingjs/styleguide';
import styledConfig from '@irvingjs/styled/config/styleguide.config.js';

const myConfig = {
    title: 'This is my styleguide',
};

module.exports = createStyleGuideConfig(myConfig, styledConfig);
  1. You may call createStyleguideConfig with no parameters and the base config will be used as-is.
  2. Proceed with caution if you intend to modify the require, styleguideComponents, styleguideDir, or webpackConfig config fields. Documentation on styleguidist configuration can be found here.
  3. Update your package.json to include the styleguide scripts. Note these scripts should point to the config you created in step 2.
{
    "scripts": {
        "styleguide:build": "BABEL_ENV=app NODE_ENV=production npx styleguidist build --config ./config/styleguide.config.js",
        "styleguide:dev": "BABEL_ENV=app NODE_ENV=development npx styleguidist server --config ./config/styleguide.config.js",
    }
}

Readme

Keywords

none

Package Sidebar

Install

npm i @irvingjs/styleguide

Weekly Downloads

1,841

Version

6.1.0

License

MIT

Unpacked Size

68 kB

Total Files

7

Last publish

Collaborators

  • alleyops
  • cahdeemer