gulpjs / gulpjs/plugin-error

PluginError toString output

Open
#14 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
20
Forks
13
PR merge metrics
No merged PRs in 30d

Description

Imported from https://github.com/gulpjs/gulp-util/issues/74.

> Currently console.log'ing the error outputs way too much:
>
> ```
> { [Error: error main.scss (Line 7: Invalid CSS after "@import ": expected file to import (string or url()), was "blah;")]
> message: 'error main.scss (Line 7: Invalid CSS after "@import ": expected file to import (string or url()), was "blah;")',
> showStack: false,
> showProperties: true,
> plugin: 'gulp-ruby-sass',
> __safety: { toString: [Function] } }
> ```
>
> It should only output:
>
> ```
> [Error: error main.scss (Line 7: Invalid CSS after "@import ": expected file to import (string or url()), was "blah;")]
> ```
>
> Or even better:
>
> ```
> [gulp-ruby-sass error: error main.scss (Line 7: Invalid CSS after "@import ": expected file to import (string or url()), was "blah;")]
> ```
>
> Just define a `.toString` method for it outputting what we want.
> ##
>
> re https://github.com/yeoman/generator-gulp-webapp/pull/242#issuecomment-67011031
>

/cc @sindresorhus @contra

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.