This package is a template you can use to create NPM packages that work well with the React library.
This project includes following features:
- 🚀 Ultra fast code bundling powered by ESBuild using tsup.
- 🚀 Turbo speed testing with
@swc/jest
, Jest and React Testing Library. - 💅 Prettier for code formatting.
- 💅 ESLint for code linting.
- 🥺 Husky for commit validation.
- 🚀 Github action to automatically publish the package on every Github Release.
- 🚀 Github action to automatically test default branch or a new Pull Request.
- 🚀 Double build for CommonJS and ES Modules - to support all JavaScript environments.
The easiest way of getting started with this template is to use the Use this template
button at the top of this page - then follow the steps to create your own repo from it.
You can use degit
to clone this repo without the git history.
npx degit github:bring-shrubbery/easy-npm-package-react
All your source code should go into src
folder.
After you do that run yarn build
and you'll have your code compiled into dist
folder.
You can also run yarn test
to test your code after you add your tests.
To have package automatically deployed on new release, add npm_token
env variable to your Github repository.