From 7011823e9c444dd64b0be47aca7a0361a006782a Mon Sep 17 00:00:00 2001 From: mirkobrombin Date: Sat, 31 Aug 2024 16:31:29 +0200 Subject: [PATCH] chore: add command to live-rebuild this is different from what the dev does, this build the dist and serves it at every change --- package.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b50f61a..0243644 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,10 @@ "preview": "vite preview", "generate-config": "node generate-config.js", "start": "node server.js", - "publish": "pnpm generate-config && pnpm build && pnpm start" + "publish": "pnpm generate-config && pnpm build && pnpm start", + "build-live": "npm-run-all -p watch:build watch:start", + "watch:build": "nodemon --watch src --ext js,ts,vue,css --exec \"npm run build\"", + "watch:start": "nodemon --watch dist --exec \"npm run start\"" }, "dependencies": { "@babel/types": "^7.24.5", @@ -34,6 +37,7 @@ "@vitejs/plugin-vue": "^5.0.4", "@vue/tsconfig": "^0.5.1", "autoprefixer": "^10.4.19", + "nodemon": "^3.1.4", "npm-run-all": "^4.1.5", "postcss": "^8.4.35", "tailwindcss": "^3.4.7", @@ -41,4 +45,4 @@ "vite": "^5.3.5", "vue-tsc": "^2.0.19" } -} +} \ No newline at end of file