Skip to content

Commit 5fbb494

Browse files
author
benholloway
committed
can now debug minified
1 parent 3520ddf commit 5fbb494

File tree

5 files changed

+432
-306
lines changed

5 files changed

+432
-306
lines changed

lib/build/browserify-nginject.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ function falafelUpdater(node) {
8787
function testAnnotated(node) {
8888
var isFunction = /^Function(Declaration|Expression)$/.test(node.type); // only functions should be annotated
8989
if (isFunction && node.parent) {
90+
// TODO @bholloway check up the parent chain while still the first body element and not a function
9091
var split = node.parent.source().split(node.source());
9192
var isAnnotated = (split.length > 1) && /@ngInject/.test(split[0]);
9293
return isAnnotated;

lib/build/browserify.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ function create(opt) {
211211
var sourceMap = convert.fromComment(code).toObject();
212212
var external = code.replace(convert.commentRegex, '//# sourceMappingURL=' + mapPath);
213213
delete sourceMap.file;
214+
delete sourceMap.sourceRoot;
214215
delete sourceMap.sourcesContent;
215216
sourceMap.sources
216217
.forEach(rootRelative);

0 commit comments

Comments
 (0)