@shaarkr/react-new
v1.0.1
Published
Custom setup for Vite projects with Tailwind, Prettier, and optionally Husky.
Downloads
1
Maintainers
Readme
@shaarkr/react-new
Custom setup for Vite projects with Tailwind, Prettier, and optionally Husky.
Installation
Install the package globally:
npm install -g @shaarkr/react-new
Usage
Run the setup script:
@shaarkr/react-new <project-directory> [--husky]
<project-directory>
: The directory where you want to set up the project.--husky
(optional): Include this flag to set up Husky and lint-staged.
Features
- Sets up a Vite project with the 'react' framework.
- Configures Tailwind CSS for styling.
- Integrates Prettier for code formatting.
- Optionally includes Husky and lint-staged for pre-commit hooks.
Manual Steps
After running the setup script, there are some manual steps you need to perform:
1. Add Tailwind Directives to index.css
Open src/index.css
in your project and add the following Tailwind CSS directives:
@tailwind base;
@tailwind components;
@tailwind utilities;
Save the file.
2. Configure Template Paths in tailwind.config.js
Open tailwind.config.js
in your project and add the following paths to the 'content' section:
content: [
"./index.html",
"./src/**/*.{js,ts,jsx,tsx}",
],
Save the file.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contribution
Feel free to contribute by opening issues or submitting pull requests.
Acknowledgments
- Inspired by the need for a consistent setup for Vite projects.
Author
Version History
- 1.0.0 (Initial Release): Release Notes