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