feat: setup, landing page
This commit is contained in:
43
.devcontainer/README.md
Normal file
43
.devcontainer/README.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# Dev Container Configuration
|
||||
|
||||
Ce dossier contient la configuration du Dev Container pour le projet Portfolio.
|
||||
|
||||
## 🚀 Fonctionnalités
|
||||
|
||||
- **Node.js 20** avec TypeScript pré-installé
|
||||
- **Extensions VS Code** automatiquement installées :
|
||||
- ESLint
|
||||
- Prettier
|
||||
- Tailwind CSS IntelliSense
|
||||
- React snippets
|
||||
- Path IntelliSense
|
||||
- Auto Rename Tag
|
||||
|
||||
- **Configuration automatique** :
|
||||
- Format à la sauvegarde avec Prettier
|
||||
- Correction ESLint automatique
|
||||
- Support TypeScript complet
|
||||
- Support Tailwind CSS
|
||||
|
||||
- **Port forwarding** :
|
||||
- Port 5173 (Vite dev server) automatiquement exposé
|
||||
|
||||
## 📋 Prérequis
|
||||
|
||||
- Docker installé et en cours d'exécution
|
||||
- VS Code avec l'extension "Dev Containers" installée
|
||||
|
||||
## 🏃 Utilisation
|
||||
|
||||
1. Ouvrir le projet dans VS Code
|
||||
2. Cliquer sur le popup "Reopen in Container" ou utiliser la commande :
|
||||
- `Cmd+Shift+P` → "Dev Containers: Reopen in Container"
|
||||
3. Attendre que le container se construise (première fois seulement)
|
||||
4. Les dépendances npm seront installées automatiquement
|
||||
5. Lancer le serveur de dev avec `npm run dev`
|
||||
|
||||
## 🔧 Personnalisation
|
||||
|
||||
Pour modifier la configuration :
|
||||
- Éditer `.devcontainer/devcontainer.json`
|
||||
- Reconstruire le container : `Cmd+Shift+P` → "Dev Containers: Rebuild Container"
|
||||
57
.devcontainer/devcontainer.json
Normal file
57
.devcontainer/devcontainer.json
Normal file
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"name": "Portfolio Dev Container",
|
||||
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye",
|
||||
|
||||
// Configure tool-specific properties
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
// Extensions to install in the container
|
||||
"extensions": [
|
||||
"dbaeumer.vscode-eslint",
|
||||
"esbenp.prettier-vscode",
|
||||
"bradlc.vscode-tailwindcss",
|
||||
"dsznajder.es7-react-js-snippets",
|
||||
"christian-kohler.path-intellisense",
|
||||
"formulahendry.auto-rename-tag",
|
||||
"ms-vscode.vscode-typescript-next"
|
||||
],
|
||||
// Settings to apply in the container
|
||||
"settings": {
|
||||
"editor.formatOnSave": true,
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": "explicit"
|
||||
},
|
||||
"typescript.tsdk": "node_modules/typescript/lib",
|
||||
"tailwindCSS.experimental.classRegex": [
|
||||
["clsx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// Forward ports for Vite dev server
|
||||
"forwardPorts": [5173],
|
||||
"portsAttributes": {
|
||||
"5173": {
|
||||
"label": "Vite Dev Server",
|
||||
"onAutoForward": "notify"
|
||||
}
|
||||
},
|
||||
|
||||
// Use 'postCreateCommand' to run commands after the container is created
|
||||
"postCreateCommand": "npm install",
|
||||
|
||||
// Use 'postStartCommand' to run commands each time the container starts
|
||||
// "postStartCommand": "npm run dev",
|
||||
|
||||
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root
|
||||
"remoteUser": "node",
|
||||
|
||||
// Features to add to the dev container
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/git:1": {
|
||||
"version": "latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user