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

Unified Diff: lib/devc.dart

Issue 1014173002: Copy resources refered to in the HTML to the output folder (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 9 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/codegen/html_codegen.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/devc.dart
diff --git a/lib/devc.dart b/lib/devc.dart
index 0628fa97a6219890d4111561f935dadee76f8a61..5e8d3aac116f132661d6bce9c07b96458f34da12 100644
--- a/lib/devc.dart
+++ b/lib/devc.dart
@@ -136,14 +136,13 @@ class Compiler {
// location. These can be external dependencies or pieces of the
// dev_compiler runtime.
if (_options.outputDir == null || _options.outputDart) return;
- var filepath = resourceOutputPath(node.uri);
+ var filepath = resourceOutputPath(node.uri, _entryNode.uri);
assert(filepath != null);
filepath = path.join(_options.outputDir, filepath);
var dir = path.dirname(filepath);
new Directory(dir).createSync(recursive: true);
- var text = node.source.contents.data;
- new File(filepath).writeAsStringSync(text);
- if (_hashing) node.cachingHash = computeHash(text);
+ new File.fromUri(node.source.uri).copySync(filepath);
+ if (_hashing) node.cachingHash = computeHashFromFile(filepath);
}
bool _isEntry(DartSourceNode node) {
« no previous file with comments | « no previous file | lib/src/codegen/html_codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698