name: j-scaffold-web description: Scaffold a new frontend web project with Vite, Tailwind CSS, and standard configuration. Supports React, Svelte, and Vue frameworks.
/j-scaffold-web
Scaffold a new frontend web project with Vite and standard configuration.
Arguments
name(required): Project name--framework:react(default),svelte, orvue
Instructions
Create the project using Vite:
pnpm create vite <name> --template <framework>-tsChange into the project directory and install dependencies:
cd <name> && pnpm installAdd and configure Tailwind CSS:
pnpm add -D tailwindcss postcss autoprefixer pnpm tailwindcss init -pConfigure the dev server to bind to
0.0.0.0and use$PORT:server: { host: "0.0.0.0", port: Number(process.env.PORT ?? 4000), }Set up Tailwind in the main CSS file with the standard directives.
Update
package.jsonscripts:dev: runs the dev server on$PORTbuild: builds for productionpreview: uses0.0.0.0
Create a basic folder structure:
src/ components/ styles/Use
hooks/for React,lib/for Svelte or Vue if needed.Replace the starter screen with a minimal page that proves Tailwind is wired correctly.
If the project uses this repo's devcontainer conventions, ensure:
just devis the default development entrypoint- browser verification uses
http://localhost:$PORT - generated instructions prefer
pnpmovernpm
Initialize git if not already in a repo.
Example Usage
/j-scaffold-web myapp
/j-scaffold-web dashboard --framework svelte