mirror of
https://github.com/penpot/penpot.git
synced 2025-12-12 06:24:17 +01:00
🔧 Make the watch script to compile the debug css when not in production env (#7250)
This commit is contained in:
@@ -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)})`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user