Skip to content

React and Typescript NPM package setup, just add your code and you should be able to publish it to NPM

License

Notifications You must be signed in to change notification settings

bring-shrubbery/easy-npm-package-react

Repository files navigation

😌 Easy NPM Package template for React

This package is a template you can use to create NPM packages that work well with the React library.

Project Overview

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.

Getting started

Use this template button

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.

Degit

You can use degit to clone this repo without the git history.

npx degit github:bring-shrubbery/easy-npm-package-react

Adding source code and building

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.

Environment Variables

To have package automatically deployed on new release, add npm_token env variable to your Github repository.

Contributors

License

MIT

About

React and Typescript NPM package setup, just add your code and you should be able to publish it to NPM

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project