react-library-boilerplate icon indicating copy to clipboard operation
react-library-boilerplate copied to clipboard

🔨 Create a React component library with no configuration

react-library-boilerplate

Easily start building your React component library using this opinionated boilerplate.

What's included:

  • Rollup and Babel for generating a bundle of your library in ES5
  • Storybook for testing the UI of your component interactively
  • Prettier, ESLint, and Stylelint for code formatting/linting
  • Sass and Autoprefixer support for simple styling

My boilerplate for React applications can be found here.

Usage

To use this boilerplate for creating your own library, execute the following commands (and replace my-library with the name of your library):

git clone https://github.com/samuelmeuli/react-library-boilerplate my-library

Clean up the files from this repository and install the dependencies:

cd my-library
rm -rf .git README.md
yarn install

Execute the start script to bundle your library and start your development server:

yarn start

Finally, open http://localhost:3000 to see your component in action.