Starter de site web : Vite 8 + React + TypeScript + Tailwind CSS.
Démo : https://jcommaret.github.io/tgv
- Node.js 20+ (LTS recommandé)
- npm
git clone https://github.com/jcommaret/tgv.git
cd tgv
npm installSi vite ou esbuild ne se lancent pas (scripts d’installation bloqués) :
npm install-scripts approve esbuild
npm install-scripts approve fseventsnpm run devOuvre http://localhost:5173/tgv/ (base Vite = /tgv/).
| Commande | Rôle |
|---|---|
npm run dev |
Serveur de développement |
npm run build |
Build TypeScript + Vite (sortie dist/) |
npm run preview |
Prévisualise le build |
npm run lint |
ESLint |
npm test |
Tests Vitest |
npm run deploy |
Build puis publication GitHub Pages (gh-pages) |
tgv/
├── index.html
├── src/
│ ├── main.tsx
│ ├── pages/ # Home, Documentation, ErrorPage
│ ├── components/ # Layout, Nav, Footer, Seo
│ ├── data/
│ └── styles/
├── vite.config.ts # alias @, @components, @data… ; base /tgv/
└── package.json
Importer un composant :
import Nav from "@components/Nav"MIT. Voir LICENSE.