vite-goto-setup
v1.0.12
Published
A CLI to quickly scaffold a Vite React folder structure with Tailwind and React Router
Maintainers
Readme
⚡ vite-goto-setup
🛠️ Effortlessly scaffold essential folders and boilerplate in your Vite + React project with one command.
📦 What It Does
vite-goto-setup sets up your Vite project by:
- 📁 Creating essential folders:
Layout,Components, andPages - 📄 Generating a basic
Layout.jsxfile withreact-router-dom - 🔧 Overwriting
main.jsxwith a router-ready template - 🧩 Optionally installing useful packages like:
axiosreact-router-domreact-icons
🚀 Getting Started
✅ Prerequisites
- A Vite project initialized with React template.
- Node.js installed (
v14+recommended)
🚀 How to Use vite-goto-setup
Follow these steps to quickly scaffold your Vite + React project structure with vite-goto-setup.
🧩 Step 1: Install the package
You can install it locally using:
npm install vite-goto-setup⚙️ Step 2: Run the CLI
Once installed (or with npx), run the following command inside the root of your Vite + React project:
npx vite-goto-setup📦 Step 3: Install Optional Dependencies
The CLI will ask you which packages you'd like to install from:
axiosreact-router-domreact-iconstailwindcss(with PostCSS and autoprefixer)
Simply use the spacebar to select/deselect during the prompt and hit Enter to confirm your choices.
📁 Step 4: Folder, File & Optional Tailwind Setup
The CLI will automatically:
📂 Create the following folders inside your
src/directory:Layout/Components/Pages/
🎨 If you select react-router-dom, it will:
📄 Generate a
Layout.jsxfile with a basic layout structure using<Outlet />fromreact-router-dom.⚙️ Overwrite your existing
main.jsxwith a router-ready setup.
🎨 If you select Tailwind CSS, it will:
- Install
tailwindcss,postcss, andautoprefixer - Generate
tailwind.config.jsandpostcss.config.js - Add Tailwind directives to your
index.css - Configure Tailwind to scan your
src/andindex.htmlfiles
- Install
✅ Step 5: You're All Set!
Now you can start your development server with:
npm run dev✍️ Author
Made with ❤️ by Neel
If you liked this package, consider giving it a ⭐ on GitHub and sharing it with your friends!
🤝 Contributing
Contributions, issues and feature requests are welcome!
Feel free to check the issues page or submit a pull request.
