Create public/css if it doesn't exist in process-styles.js
This commit is contained in:
parent
9800e5de70
commit
e4eb9a846c
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue