Skip to content

andrewdyer/react-package-template

Repository files navigation

React Package Template

React Package Template

A template for creating React packages.

⚖️ License

Licensed under the MIT license and is free for private or commercial projects.

✨ Introduction

This template is designed to provide a solid foundation to help you hit the ground running and save valuable time when starting a new React package. With all the necessary tools and configurations included, you can focus on building your package without worrying about the initial setup.

📋 Prerequisites

Before you begin, ensure you have met the following requirements:

  • Node.js: Version 20.x (as specified in .nvmrc) is required.
  • npm: Dependency management tool, version 9.x or higher.
  • yalc (optional): For local package development and testing.

🛠️ Features

This template includes the following tools and configurations:

  • TypeScript for static type checking, with configurations for both ESM and CommonJS modules.
  • Jest for unit testing, along with React Testing Library for testing React components.
  • Storybook for building and testing UI components in isolation.
  • Prettier for consistent code formatting across the codebase.
  • Husky for Git hooks to automate tasks such as formatting, type-checking, and testing before commits.
  • CI (Continuous Integration) setup with GitHub Actions for automated testing, building, type-checking, and publishing the package to npmjs.

🚀 Getting Started

If you like what you've seen so far and think this setup fits your needs, you can quickly get started by clicking the Use this template button at the top of the repository on GitHub.

🤝 Contributing

Before contributing to this package, please refer to the contributing documentation.