From f29f962de4d4661ae0ffc40fc17b3dbd80fc21ec Mon Sep 17 00:00:00 2001 From: Romein van Buren Date: Fri, 8 Jul 2022 14:50:06 +0200 Subject: [PATCH] Cleanup correctly Signed-off-by: Romein van Buren --- dashboard.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dashboard.js b/dashboard.js index 5c70946..2e2227e 100644 --- a/dashboard.js +++ b/dashboard.js @@ -5,7 +5,7 @@ const { svelte } = require('@sveltejs/vite-plugin-svelte'); const fs = require('fs').promises; const build = (prefix = '') => viteBuild({ - root: __dirname + '/gui/dashboard', + root: __dirname + '/gui/dashboard/', base: `${prefix}/statusdashboard/asset/`, plugins: [ svelte() ], build: { @@ -20,7 +20,10 @@ const build = (prefix = '') => viteBuild({ }, }); -const cleanup = () => fs.rmdir(__dirname + '/gui/dashboard/build'); +const cleanup = () => fs.rm(__dirname + '/gui/dashboard/build', { + recursive: true, + force: true, +}); module.exports = { build, cleanup }; build();