This script automates the setup of a new React project using Vite, with options for TypeScript or JavaScript and includes Tailwind CSS.
I wanted to quickly set up my projects without the hassle of copying and pasting multiple commands. So why not write a script to automate it? This script simplifies the process, allowing me to focus on building my applications.
- Node.js and npm must be installed on your system.
- The folder containing
rts.batmust be added to your environment variables.
-
Open Command Prompt: Navigate to the folder where you want to set up your frontend project.
-
Run the Script: Type
rtsand press Enter. -
Enter Project Details: When prompted, enter the project name and specify whether to use TypeScript or JavaScript. For example:
-
Enter project-name and TypeScript option (e.g., my-project t or my-project j): my-project-name t