Skip to content

Commit

Permalink
Fix style error output
Browse files Browse the repository at this point in the history
  • Loading branch information
rsefer committed Sep 18, 2023
1 parent 7179d78 commit a1829ed
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lib/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const buildSass = async (entry, name, entriesToLint) => {
fix: true
}).then((data) => {
if (data.errored) {
console.log(data.output);
console.error(data.output);
log('error', `Failed linting ${entry.replace(project.path + '/_src/style/', '')} - See above error.`);
return false;
}
Expand All @@ -65,9 +65,9 @@ const buildSass = async (entry, name, entriesToLint) => {
});
fs.writeFile(outFile, result.css, function(err) {
if (err) {
console.log(err);
log('error', `Failed building ${entryLabel} - See above error.`);
return false;
// console.error(err);
// log('error', `Failed compiling ${entryLabel} - See above error.`);
// return false;
} else {
if (!fs.existsSync(project.path + '/dist')) {
fs.mkdirSync(project.path + '/dist');
Expand All @@ -91,9 +91,10 @@ const buildSass = async (entry, name, entriesToLint) => {
});
}
});
} catch {
} catch(error) {
console.error(error);
log('error', `Failed building ${entryLabel} - See above error.`);
return false;
return false;
}
});
};
Expand Down

0 comments on commit a1829ed

Please sign in to comment.