nebulosa-css/build.js

22 lines
444 B
JavaScript
Raw Normal View History

2023-03-01 22:48:48 +01:00
import sass from "sass"
import fs from "fs"
2023-03-01 23:27:34 +01:00
const { css } = sass.compile(
2023-03-01 22:48:48 +01:00
"./src/main.scss",
{ style: "compressed" }
2023-03-01 23:27:34 +01:00
)
2023-03-01 22:48:48 +01:00
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
)