From e4eb9a846c4c712875f9e76ea7ea908bddf94ec5 Mon Sep 17 00:00:00 2001 From: Robbie Antenesse Date: Fri, 6 Sep 2019 16:13:11 -0600 Subject: [PATCH] Create public/css if it doesn't exist in process-styles.js --- process-styles.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/process-styles.js b/process-styles.js index ba11bbe..91138d6 100644 --- a/process-styles.js +++ b/process-styles.js @@ -21,6 +21,12 @@ sass.render({ file: 'index.scss' }, function (sassErr, css) { console.warn(warn.toString()); }); + if (!fs.existsSync('public')) { + fs.mkdirSync('public'); + } + if (!fs.existsSync('public/css')) { + fs.mkdirSync('public/css'); + } fs.writeFile('public/css/index.css', result.css, (fileErr) => { if (fileErr) { throw fileErr;