react-storybook-archref v1.0.6
UI library using React + Storybook with TypeScript and Jest
This is a boilerplate project for writing React NPM modules (or component libraries) in TypeScript + Storybook.
This boilderplate includes a Storybook to visualize and demonstrate your components.
Features
- TypeScript with automatic linting via ESLint + Prettier
- Unit testing with Jest + @testing-library/react
- Storybook + hot reloading, including the addons Actions, Knobs, Storysource, Notes, Viewport, Console, and Centered.
Usage
- Fork or clone this repository
- If using VS Code, install recommended extensions
npm installnpm run start:storybook- Create your components
- Export your components in
index.ts npm buildTo build your React components befor deploying to NPM.npm publishPublish your module.
After puplish
To do...
npm Scripts
test- run unit teststest:cover- run unit tests with test coveragelint- checkeslintandprettierruleslint:fix- autofix unmeteslintandprettierrulesstart:storybook- start the storybook server and automatically open in browserbuild- for deploymentbuild:storybook- run this command to build your storybooknpm publish- run this command to publish your packages to npm
Before each commit, husky and lint-staged will automatically lint your staged ts, tsx, js, jsx files.
Configuration
npm login
Dependabot (optional)
I recommend enabling Dependabot on this repository to keep your dependencies up to date. Each dependency update will be created as a PR, which will automatically validate via Circle CI and you can manually validate via Zeit.
License
This code is released under the MIT license - feel free to use it.
Contribute
Please contribute any improvements or fixes to this project!
To make sure you have a pleasant experience, please read the code of conduct. It outlines core values and beliefs and will make working together a happier experience.