This repository has been archived on 2025-06-11. You can view files and clone it, but cannot push or open issues or pull requests.
www_ow_freezone/initcss.js
2022-02-03 14:39:30 +03:00

20 lines
510 B
JavaScript

// Makes a simple ./static/css/index.css file right after "clean" so there *is* one
// ... thus keeping Zola from erroring out when you do `npm run start` (dev mode)
const fs = require("fs")
const initDir = 'static/css'
const initCSSFile = 'static/css/index.css'
const initValue = `
body {
color: green;
background-color: yellow;
font-family: monospace;
}
`
if(!fs.existsSync(initDir)) {
fs.mkdirSync(initDir)
}
if(!fs.existsSync(initCSSFile)) {
fs.writeFileSync(initCSSFile, initValue)
}