Skip to content
This repository was archived by the owner on Sep 1, 2022. It is now read-only.
This repository was archived by the owner on Sep 1, 2022. It is now read-only.

PluginError toString output #74

@sindresorhus

Description

@sindresorhus

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 yeoman/generator-webapp#242 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions