initial commit
This commit is contained in:
20
initcss.js
Normal file
20
initcss.js
Normal file
@@ -0,0 +1,20 @@
|
||||
// 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)
|
||||
}
|
Reference in New Issue
Block a user