fix: create ./src/_includes/css/ if necessary

This commit is contained in:
Laureηt 2022-01-24 19:06:15 +01:00
parent d247352a90
commit 05372ba464
No known key found for this signature in database
GPG key ID: D88C6B294FD40994

View file

@ -29,6 +29,15 @@ module.exports = function (eleventyConfig) {
}); });
eleventyConfig.on("eleventy.before", async () => { eleventyConfig.on("eleventy.before", async () => {
// mkdir ./src/_includes/css/ if necessary
fs.mkdir("./src/_includes/css/", (err) => {
if (err) {
return console.error(err);
}
console.log("Directory created successfully!");
});
// iterate over scss files
let files = fs.readdirSync("./src/scss/"); let files = fs.readdirSync("./src/scss/");
files.forEach((file) => { files.forEach((file) => {
// Compile SASS // Compile SASS