Skip to content

Commit 5db9ac2

Browse files
committed
add file option
to include the name of the parsed file in every `loc` object
1 parent fb2a4ea commit 5db9ac2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,10 @@ module.exports = function(css, opts){
365365
if (!sel) return;
366366
comments();
367367
var ret = { selectors: sel, declarations: declarations() };
368-
if (loc) ret.loc = loc;
368+
if (loc) {
369+
if (opts.file) loc.file = opts.file;
370+
ret.loc = loc;
371+
}
369372
return ret;
370373
}
371374

0 commit comments

Comments
 (0)