A boilerplate project to get started building modular React components, and deploying them to NPM.
This project is setup with Flow, ESLint, CircleCI, and Code Climate.
git clone https://github.com/gregchamberlain/react-component-boilerplate.git <project-name>
cd <project-name>
git remote remove origin
git remote add origin <your-git-remote-url>
yarn install
ornpm install
- Update
package.json
with relevant information (name, description, keywords, repository, author, license, bugs, homepage) - Update
.circleci/config.yml
with your relevant Code Climate reporter id.
The development environment is already setup and ready to go (hot-loading and linting included!)
- Build only your library component/components in /src folder (this is what will be published to npm)
- Work with your component in the
examples
directory. yarn start
ornpm start
Tests are written in the __tests__
directory, using Jest, and enzyme
- Ensure correct information in package.json
npm publish
(this will build the project, then publish it)