Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log gulp error to Chart.js #5143

Merged
merged 13 commits into from Jan 13, 2018
5 changes: 5 additions & 0 deletions gulpfile.js
Expand Up @@ -82,6 +82,11 @@ function buildTask() {

var errorHandler = function (err) {
util.log(util.colors.red('[Error]'), err.toString());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would move that line before this.emit('end');, it's only useful when ignoring exceptions

var browserError = 'console.error("Gulp: ' + err.toString() + '")';
fs.writeFileSync(outDir+'Chart.js', browserError);
fs.writeFileSync(outDir+'Chart.min.js', browserError);
fs.writeFileSync(outDir+'Chart.bundle.js', browserError);
fs.writeFileSync(outDir+'Chart.bundle.min.js', browserError);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@simonbrunel if possible, i would like to be able to see the errors directly in the browser. I prefer to work in the editor and the browser only, and not have to check the terminal.

this.emit('end');
}

Expand Down