Skip to content

Commit a480af4

Browse files
author
benholloway
committed
added more error parsing in browserify
1 parent 2827aea commit a480af4

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.gitignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
node_modules
2-
.idea
3-
test/test-temp
1+
/.idea
2+
/node_modules
3+
/test/test-temp
4+
npm-debug.log

lib/build/browserify.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,10 @@ function compile(bannerWidth, transforms) {
182182
} else if (analysis = /^\s*Error: SyntaxError\:\s*(.*)\s*while parsing json file\s*([^]*)/.exec(text)) {
183183
message = [analysis[2], '0', '0', ' ' + analysis[1]].join(':') + '\n';
184184

185+
// Line <line>: <reason>: <file>
186+
} else if (analysis = /Line\s*(\d+)\s*\:\s*([^:]*)\s*:\s*(.*)\s*/.exec(text)) {
187+
message = [analysis[3], analysis[1], 0, ' ' + analysis[2]].join(':') + '\n';
188+
185189
// Error: Cannot find module '<reason>' from '<directory>'
186190
// find the first text match for any text quoted in <reason>
187191
} else if (analysis = /^\s*Error\: Cannot find module '(.*)\'\s*from\s*\'(.*)\'\s*$/.exec(text)) {

0 commit comments

Comments
 (0)