This Bash script automates the setup of a Nuxt 3 project with Tailwind CSS and Pinia state management.
It ensures the required tools are installed, asks for user preferences, and sets up everything automatically.
ā
Checks if npm and pnpm are installed (installs pnpm if missing)
ā
Asks for the project name (default: my-nuxt-app
)
ā
Option to create the project in the current directory or a new folder
ā
Lets you choose between pnpm or npm as the package manager
ā
Installs Nuxt 3, Tailwind CSS, and Pinia
ā
Configures Tailwind CSS & Nuxt settings automatically
git clone https://github.com/astratow/nuxt-starter.git
cd nuxt-starter
chmod +x start-nuxt.sh
2ļøā£ Run the Script
./start-nuxt.sh
1ļøā£ Asks for the project name (default: window-quote-app)
2ļøā£ Asks if you want to create the project in the current directory
3ļøā£ Checks & installs pnpm if missing
4ļøā£ Lets you choose between pnpm or npm
5ļøā£ Runs nuxi init to create the Nuxt 3 project
6ļøā£ Installs dependencies (Nuxt 3, Tailwind CSS, Pinia)
7ļøā£ Configures Tailwind CSS automatically
8ļøā£ Sets up nuxt.config.ts with Tailwind & Pinia
Once setup is complete, run:
bash
pnpm run dev # or npm run dev if chosen
This will start a development server on localhost:3000.
pnpm Not Found in Git Bash?
If pnpm is installed but not found in Git Bash, add it to your PATH:
bash
echo 'export PATH="$PATH:/c/Users/YourUser/AppData/Local/pnpm"' >> ~/.bashrc
source ~/.bashrc
Or enable corepack:
bash
corepack enable
corepack prepare pnpm@latest --activate