Code Monkey home page Code Monkey logo

react-storybook-rollup's Introduction

react-storybook-rollup

Maintain your UI library as a separate project!

This project contains a combination of:

  • Storybook - the UI environment for developing React components
  • Rollup - module bundler that bundles all your components

What does it do?

  • It lets you develop your React components in isolation
  • It serves as documentation of your components for designers and other developers
  • It bundles all your components developed with Storybook into one single portable dependency that you can inject into your app.

Usage

Storybook

  1. Run npm install
  2. Run npm run storybook in order to run Storybook, visit localhost:6006

You can also build a static version of Storybook (that could be deployed to some shared location) by running npm run build-storybook

Rollup - building package

  • npm run build:dev - builds a package in development mode (i.e. no minifying and uglyfying)
  • npm run build:dev-w - same as above, but is watching changes and rebuilds immediately after one is found
  • npm run build:prod - builds a production package, which can be found in /build folder of your app

Storybook and Rollup configuration

Storybook is awesome tool. And Rollup is an awesome bundler. But combined together they are twice as awesome!

Storybook itself is easily configurable and can be adjusted to your needs with a bunch of plugins and configuration files. The instance of Storybook housed in this project is additionally preconfigured with the most useful addons. This includes:

  • Better UX (elements positioning, library version displaying, better elements hierarchy handling)
  • info plugin - every component gets automatically created documentation page with props info etc. You can also include your own README
  • knobs plugin - lets you easily configure the component before injecting it into your application

react-storybook-rollup's People

Contributors

pppemo avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.