🔧 Make the watch script to compile the debug css when not in production env (#7250)

This commit is contained in:
Belén Albeza
2025-09-03 13:45:11 +02:00
committed by GitHub
parent 34da6b64df
commit 9c77296858

View File

@@ -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)})`);
}