ts-react-kit is a starter project for building React applications with TypeScript. It includes some common tools for development and testing, including:
- 🚀 React.js with TypeScript: Build robust, scalable, and maintainable UIs with the React.js framework, enhanced with TypeScript for type safety and improved development experience.
- 🎨 Tailwind CSS: Rapidly prototype and design beautiful, responsive UIs with the highly customizable CSS framework.
- 🧹 ESLint and Prettier: Enforce consistent code style and catch errors early with the help of the popular code linters and formatters.
- 🤖 lint-staged: Automatically check and format code before committing it to version control, ensuring that your codebase is always clean and consistent.
- 🧪 Jest and React Testing Library: Write automated tests for your React components with the popular testing frameworks, ensuring that your UI works as expected.
To get started with ts-react-kit, you'll need to have Node.js and npm installed on your machine. Once you have those installed, you can follow these steps:
- Clone this repository:
git clone https://github.com/dpejic/ts-react-kit.git
- Install the dependencies:
cd ts-react-kit
npm install
- Start the development server:
npm start
This will start a development server at http://localhost:3000/
where you can view your app in the browser.
To run the tests for this project, you can use the following command:
npm test
This will run all of the tests in the src
directory using Jest and the React Testing Library.
This project uses ESLint and Prettier to help maintain code quality and consistency. You can run the linter and formatter manually using the following commands:
npm run lint:(eslint|prettier)
npm run format:(eslint|prettier)
However, it's recommended to use lint-staged
to automatically run these tools on files that are staged for a commit.
To deploy your app, you can use the npm run build
command to create a production-ready build of your app. This will create a build
directory with optimized static assets that you can then deploy to a hosting provider of your choice.
Contributions to ts-react-kit are welcome! To contribute, please fork the repository, create a new branch with your changes, and submit a pull request.