Last change
on this file since 76712b2 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
756 bytes
|
Line | |
---|
1 | "use strict";
|
---|
2 |
|
---|
3 | Object.defineProperty(exports, "__esModule", {
|
---|
4 | value: true
|
---|
5 | });
|
---|
6 | exports.default = void 0;
|
---|
7 |
|
---|
8 | class Warning extends Error {
|
---|
9 | constructor(warning) {
|
---|
10 | super(warning);
|
---|
11 | const {
|
---|
12 | text,
|
---|
13 | line,
|
---|
14 | column
|
---|
15 | } = warning;
|
---|
16 | this.name = "Warning"; // Based on https://github.com/postcss/postcss/blob/master/lib/warning.es6#L74
|
---|
17 | // We don't need `plugin` properties.
|
---|
18 |
|
---|
19 | this.message = `${this.name}\n\n`;
|
---|
20 |
|
---|
21 | if (typeof line !== "undefined") {
|
---|
22 | this.message += `(${line}:${column}) `;
|
---|
23 | }
|
---|
24 |
|
---|
25 | this.message += `${text}`; // We don't need stack https://github.com/postcss/postcss/blob/master/docs/guidelines/runner.md#31-dont-show-js-stack-for-csssyntaxerror
|
---|
26 |
|
---|
27 | this.stack = false;
|
---|
28 | }
|
---|
29 |
|
---|
30 | }
|
---|
31 |
|
---|
32 | exports.default = Warning; |
---|
Note:
See
TracBrowser
for help on using the repository browser.