PixelOven.Story
Storybook is an amazing tool for developing components in isolation out side of the constraints for a more standard application workflow. Because of this we wanted to provide an extension to PixelOven that would provide support for storybook.
Installation
Note the current version of this extension only supports react as that is the primary use case for PixelOven. Though our ultimate goal is to provide a more general development platform we want to first nail this subset before conquering others.
To install this addon simply run the following with NPM
or yarn
API Reference
Argument | Description |
---|---|
story | CLI entry point for interfacing with Storybook. |
Story wraps the standalone implementation of storybook while also abstracting away the configuration to work closely with the rest of PixelOven's CLI. This addon shares some dependencies with our webpack addon to maintain a similar level of support for Typescript, SCSS and other important features.
Argument | Required | Default | Description |
---|---|---|---|
<task> | Yes | N/A | Determines how to build storybook. |
Based on the task provided Storybook will be built in one of two modes.
Argument | Description |
---|---|
build | Builds Storybook for static file serving. |
start | Runs Storybook in watch mode for local development. |
Options
Option | Default | Description |
---|---|---|
--output-dir | ./stories | Output directory for static files. |
--port | 9001 | Port for hosting storybook in watch mode. |
--quiet | false | Whether storybook should log to console or not. |
Usage
To run storybook in development/watch mode on a specific port you.
Or build storybook for hosting as a static site.
Of course you can also just use the default values which are recommended.