包详细信息

@kadira/storybook-deployer

kadirahq16.3kMIT1.2.0

Deploy your storybook as a webapp.

storybook, deploy, static

自述文件

Storybook Deployer

This is a simple tool allows you to deploy your Storybook into a static hosting service. (Currently, GitHub Pages only.)

Getting Started

Install Storybook Deployer with:

npm i --save @kadira/storybook-deployer

Then add a NPM script like this:

{
  "scripts": {
    ...
    "deploy-storybook": "storybook-to-ghpages",
    ...
  }
}

Then you can run npm run deploy-storybook to deploy the Storybook to GitHub Pages.

Custom Build Configuration

If you customize the build configuration with some additional params (like static file directory), then you need to expose another NPM script like this:

{
  "scripts": {
    ...
    "build-storybook": "build-storybook -s public -o .out",
    ...
  }
}

Make sure to set the output directory as .out.

更新日志

Change Log

v1.2.0

09-Sep-2016

  • Add a trailing slash to the URL where it's the correct GH pages URL.

v1.1.0

08-Aug-2016

  • Fix issue when there's already a build-storybook command. See: #1.
  • Add some better logs when executing commands.
  • Now we create a random directory to build the output.

v1.0.0

07-May-2016

  • Initial Release