This project is designed to be used as a starting place for creating a React library/component to share with others (e.g., through npm for instance). Just download the repo as a zip and edit as you like. The design was influenced by library-boilerplate and Redux.
- Jest for testing
- GitBook for docs. Sample generated docs.
- Travis CI configuration
- AirBnB eslint with a couple rule changes
- CommonJS and UMD build targets
- Examples with Create React App
Storybook coming soon...
What follows below is a sample README you could consider using for your project.
Description of your library.
For details on how to use it, read the docs or browse the examples.
npm install --save react-library-starter
Describe how to use your library in code with an example.
- simple - A simple example
During development of examples, it can be helpful to have a watch running automatically rebuilding the package when changes take place. To get this running run:
npm run dev
npm run build
npm run lint
To lint examples, run:
npm run lint:examples
npm run test
To test examples, run:
npm run test:examples
When editing the docs, it helps to have a dev server watching changes. To do this, run:
npm run docs:watch
To build the docs, run:
npm run docs:build
To publish the docs, run:
npm run docs:publish
MIT