UNPKG

@nynrathod/react-quick-starter

Version:
109 lines (71 loc) 2.6 kB
# @nynrathod/react-quick-starter A quick CLI tool to scaffold **React + Vite** projects with optional **TypeScript** and **Tailwind CSS**. --- ## Features - Create React projects with **Vite**. - Optional **TypeScript** support. - Optional **Tailwind CSS** setup with Prettier integration. - Automatically configures `vite.config.js`. - Automatically added essential dependencies like `react-router-dom` and `prettier`. --- ## Installation Install the CLI globally using your preferred package manager: ### Using npm ```bash npm install -g @nynrathod/react-quick-starter ``` ### Using yarn ```bash yarn global add @nynrathod/react-quick-starter ``` --- ## Usage Run the CLI to create a new React project with Vite: ```bash rqs create my-app ``` - Replace `my-app` with your project name. - Follow the prompts to choose **TypeScript** and/or **Tailwind CSS**. - Use `--latest` flag to fetch the latest package versions: ```bash rqs create my-app --latest ``` After creating your project, navigate into the folder and install dependencies, then start the development server: ```bash cd my-app ``` ```bash # Using npm npm install npm run dev ``` ```bash # Or using Yarn yarn install yarn dev ``` This starts the Vite development server, and your app will be live at `http://localhost:5173`. --- ## Options - `--latest`: Uses the latest package versions from npm instead of predefined versions. - **TypeScript**: Adds TypeScript support if selected during setup. - **Tailwind CSS**: Configures Tailwind CSS with Prettier integration if chosen. --- ## Dependencies Added - **react-router-dom**: For client-side routing. - **prettier**: For code formatting. - **tailwindcss** (optional): For utility-first CSS. - **@tailwindcss/vite** (optional): Vite plugin for Tailwind. - **prettier-plugin-tailwindcss** (optional): Prettier plugin for Tailwind. --- ## Troubleshooting - **Error creating Vite project**: Ensure your package manager (`npm` or `yarn`) is installed. - **Dependency issues**: Run `npm install` or `yarn install` in the project folder. - **Tailwind not working**: Verify `index.css`, and `vite.config.js` are correctly set up. For issues, check the [GitHub Issues](https://github.com/nynrathod/react-quick-starter/issues) page or file a new issue. --- ## Contributing Contributions are welcome! Fork the repo, make changes, and submit a pull request at [GitHub](https://github.com/nynrathod/react-quick-starter). --- ## License MIT License.