@ecrowjs/storybook v1.0.0
Storybook configurations for eCrowJS component libraries. This is not a fork of the Storybook repository; instead, it's a package containing common storybook configurations, addons, and CLI for visually testing most eCrowJS component libraries. Possibly more properly defined as a Storybook "wrapper".
To learn more about Storybook, check out their website or GitHub page.
Installation
eCrowJS Storybook can be installed as an npm package itself.
# Install with NPM
npm install @ecrowjs/storybook --save-dev
# Install with Yarn
yarn add @ecrowjs/storybook --devUsage
eCrowJS Storybook will include files in your project's src folder that match the expression below:
// Regular Expression
.chapter.tsx$
// Glob
*.chapter.tsxIn a chapter file, you can include the Story function from @ecrowjs/storybook package to add it to the application:
// ReactJS Example
import Story from '@ecrowjs/storybook';
import React from 'react';
import MyComponent from './MyComponent';
Story('Name of Story').add('MyComponentChapter', () => {
return <MyComponent />;
});Finally, to run the storybook application in development mode, you can use the command:
$ ecrowjs-storybookThat's all there is to it.
5 years ago