Skip to content

Commit 39b792b

Browse files
committed
insert loaded from
1 parent e4523d0 commit 39b792b

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

lib/cts-parser.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -340,9 +340,9 @@ var CtsParser = {
340340

341341
// Handle dependency specs first
342342
if (kind == 'css') {
343-
f.dependencySpecs.push(new DependencySpec('css', h[0]));
343+
f.dependencySpecs.push(new DependencySpec('css', h[0], fromLocation));
344344
} else if (kind == 'cts') {
345-
f.dependencySpecs.push(new DependencySpec('cts', h[0]));
345+
f.dependencySpecs.push(new DependencySpec('cts', h[0], fromLocation));
346346
var url = h[0];
347347
if (typeof fromLocation != 'undefined') {
348348
url = Util.Net.fixRelativeUrl(url, fromLocation);
@@ -355,7 +355,7 @@ var CtsParser = {
355355
)
356356
);
357357
} else if (kind == 'js') {
358-
f.dependencySpecs.push(new DependencySpec('js', h[0]));
358+
f.dependencySpecs.push(new DependencySpec('js', h[0], fromLocation));
359359
} else {
360360
// Everything else is a TreeSpec
361361
var treeSpec = new TreeSpec(kind, h, headerOpts);

lib/spec/dependency-spec.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
var Util = require('cts/util');
22

3-
var DependencySpec = function(kind, url) {
3+
var DependencySpec = function(kind, url, loadedFrom) {
44
this.kind = kind;
55
this.url = url;
6+
this.loadedFrom = loadedFrom;
67
this.loaded = false;
78
};
89

0 commit comments

Comments
 (0)