From e82f02039f3d9ed50347c3f2adc38fe2cce586fc Mon Sep 17 00:00:00 2001 From: 4NK IA Date: Fri, 19 Sep 2025 08:41:56 +0000 Subject: [PATCH] =?UTF-8?q?chore(dev):=20add=20start:dev=20(clean+backend+?= =?UTF-8?q?vite=20s=C3=A9quentiel)=20[skip=20ci]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + package.json | 2 ++ 2 files changed, 3 insertions(+) diff --git a/README.md b/README.md index dccca23..ef6f95f 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,7 @@ VITE_INFOGREFFE_API_URL=https://api.infogreffe.fr ```bash # Développement npm run start:all # Démarrer backend (PM2) + frontend (Vite) ensemble +npm run start:dev # Clean complet, backend restart, front Vite (séquentiel) npm run dev # Serveur de développement (frontend seul) npm run build # Build de production npm run preview # Prévisualisation du build diff --git a/package.json b/package.json index 07bcb8f..9ef812f 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,10 @@ "clean:all": "rm -rf node_modules backend/node_modules dist cache log uploads backend/cache backend/uploads && mkdir -p uploads cache log backend/uploads backend/cache && npm ci --no-audit --no-fund && (cd backend && npm ci --no-audit --no-fund)", "back:up": "npx --yes pm2 start ecosystem.config.cjs --only 4nk-ia-backend --env production", "back:restart": "npx --yes pm2 restart 4nk-ia-backend || npx --yes pm2 start ecosystem.config.cjs --only 4nk-ia-backend --env production", + "prefront:up": "bash -lc 'p=$(ss -ltnp | grep :5174 | sed -n \"s/.*pid=\\([0-9]*\\).*/\\1/p\"); if [ -n \"$p\" ]; then kill $p; fi'", "front:up": "vite", "start:all": "npm run clean:all && concurrently -k -n back,front -c blue,green \"npm:back:restart\" \"npm:front:up\"", + "start:dev": "npm run clean:all && npm run back:restart && npm run front:up", "lint": "eslint .", "preview": "vite preview", "format": "prettier --check .",