22 lines
444 B
JavaScript
22 lines
444 B
JavaScript
|
import sass from "sass"
|
||
|
import fs from "fs"
|
||
|
|
||
|
const css = sass.compile(
|
||
|
"./src/main.scss",
|
||
|
{ style: "compressed" }
|
||
|
).css
|
||
|
|
||
|
const now = new Date()
|
||
|
.toISOString()
|
||
|
.replace(/\.\S+/g, "")
|
||
|
.replace(/:/g, ".")
|
||
|
.replace(/T/g, "_")
|
||
|
|
||
|
if (!fs.existsSync("./out"))
|
||
|
fs.mkdirSync("./out")
|
||
|
|
||
|
fs.writeFileSync(
|
||
|
`./out/${now}.css`,
|
||
|
"/* Generated using Nebulosa CSS. https://git.qwik.space/BurnyLlama/nebulosa-css */\n" + css
|
||
|
)
|