Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: lib/src/dependency_graph.dart

Issue 1152573003: Fixes #196 - Enable resources to be served (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Reformat Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | lib/src/options.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/dependency_graph.dart
diff --git a/lib/src/dependency_graph.dart b/lib/src/dependency_graph.dart
index 6f78db1843468a777834889981d6bc26bebc88cc..63cbe804fcd8984f9fe33ea150150334c90b9948 100644
--- a/lib/src/dependency_graph.dart
+++ b/lib/src/dependency_graph.dart
@@ -76,6 +76,8 @@ class SourceGraph {
}
});
}
+
+ List<String> get resources => _options.resources;
}
/// A node in the import graph representing a source file.
@@ -198,6 +200,9 @@ class HtmlSourceNode extends SourceNode {
}
var newResources = new Set<ResourceSourceNode>();
+ for (var resource in graph.resources) {
+ newResources.add(graph.nodeFromUri(uri.resolve(resource)));
+ }
for (var tag in document.querySelectorAll('link[rel="stylesheet"]')) {
newResources
.add(graph.nodeFromUri(uri.resolve(tag.attributes['href'])));
« no previous file with comments | « no previous file | lib/src/options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698