From 9c77296858710192bb862197242ae6be54cbf4a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bel=C3=A9n=20Albeza?= Date: Wed, 3 Sep 2025 13:45:11 +0200 Subject: [PATCH] :wrench: Make the watch script to compile the debug css when not in production env (#7250) --- frontend/scripts/watch.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frontend/scripts/watch.js b/frontend/scripts/watch.js index eeeb06eec9..57e9be6016 100644 --- a/frontend/scripts/watch.js +++ b/frontend/scripts/watch.js @@ -5,6 +5,8 @@ import log from "fancy-log"; import * as h from "./_helpers.js"; import ppt from "pretty-time"; +const isDebug = process.env.NODE_ENV !== "production"; + const worker = h.startWorker(); let sass = null; @@ -16,6 +18,11 @@ async function compileSassAll() { let output = await h.concatSass(sass); await fs.writeFile("./resources/public/css/main.css", output); + if (isDebug) { + let debugCSS = await h.compileSassDebug(worker); + await fs.writeFile("./resources/public/css/debug.css", debugCSS); + } + const end = process.hrtime(start); log.info("done: compile styles", `(${ppt(end)})`); }