webpack_rails 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/webpack_rails/ErrorMessagePlugin.js +42 -1
- data/lib/webpack_rails/package.json +1 -1
- data/lib/webpack_rails/task.rb +2 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80a7e3a77159d1eee39c12eb365ee2e6fc9eb08c
|
4
|
+
data.tar.gz: 7621ed395e73ad84e7ad24c9f533584474be324d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa258967efb81ba2d2e7ea2daf80ba5dce03dc2b780631aa5075a59a38408af1b24f5abadef411feb9d6ffbe8749302dc6434f058229d752ceed4d456b8800f9
|
7
|
+
data.tar.gz: 7acef91df5da7c2f8bb50dbe643f3bf75369e82bea4f69c078934bfe9811d7005c1659980ee3ae332e01ef642871ab8e069a872163d2ae0a829fc0f7909608ff
|
@@ -46,7 +46,48 @@ function renderErrorJsCode(errors) {
|
|
46
46
|
}
|
47
47
|
|
48
48
|
function cleanCompilationErrorMessages(errors) {
|
49
|
-
|
49
|
+
var errorMessages = errors.map(formatError);
|
50
|
+
return stripAnsi(errorMessages.join('\n\n')).replace(errorTypePattern, '');
|
51
|
+
}
|
52
|
+
|
53
|
+
// from webpack/lib/Stats.js
|
54
|
+
function formatError(e) {
|
55
|
+
var requestShortener = {
|
56
|
+
shorten: function(request) { return request; },
|
57
|
+
};
|
58
|
+
var showErrorDetails = true;
|
59
|
+
var text = "";
|
60
|
+
if(typeof e === "string")
|
61
|
+
e = {
|
62
|
+
message: e
|
63
|
+
};
|
64
|
+
if(e.chunk) {
|
65
|
+
text += "chunk " + (e.chunk.name || e.chunk.id) +
|
66
|
+
(e.chunk.entry ? " [entry]" : e.chunk.initial ? " [initial]" : "") + "\n";
|
67
|
+
}
|
68
|
+
if(e.file) {
|
69
|
+
text += e.file + "\n";
|
70
|
+
}
|
71
|
+
if(e.module && e.module.readableIdentifier && typeof e.module.readableIdentifier === "function") {
|
72
|
+
text += e.module.readableIdentifier(requestShortener) + "\n";
|
73
|
+
}
|
74
|
+
text += e.message;
|
75
|
+
if(showErrorDetails && e.details) text += "\n" + e.details;
|
76
|
+
if(showErrorDetails && e.missing) text += e.missing.map(function(item) {
|
77
|
+
return "\n[" + item + "]";
|
78
|
+
}).join("");
|
79
|
+
if(e.dependencies && e.origin) {
|
80
|
+
text += "\n @ " + e.origin.readableIdentifier(requestShortener);
|
81
|
+
e.dependencies.forEach(function(dep) {
|
82
|
+
if(!dep.loc) return;
|
83
|
+
if(typeof dep.loc === "string") return;
|
84
|
+
if(!dep.loc.start) return;
|
85
|
+
if(!dep.loc.end) return;
|
86
|
+
text += " " + dep.loc.start.line + ":" + dep.loc.start.column + "-" +
|
87
|
+
(dep.loc.start.line !== dep.loc.end.line ? dep.loc.end.line + ":" : "") + dep.loc.end.column;
|
88
|
+
});
|
89
|
+
}
|
90
|
+
return text;
|
50
91
|
}
|
51
92
|
|
52
93
|
module.exports = ErrorMessagePlugin;
|
data/lib/webpack_rails/task.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webpack_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Friend
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: node_task
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.3.
|
19
|
+
version: 0.3.5
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.3.
|
26
|
+
version: 0.3.5
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: tilt
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|