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

Unified Diff: lib/src/compiler.dart

Issue 1645343002: Builds / serves multiple HTML files. (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Address comments Created 4 years, 11 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 | « lib/src/codegen/html_codegen.dart ('k') | lib/src/options.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/compiler.dart
diff --git a/lib/src/compiler.dart b/lib/src/compiler.dart
index e0d6812f340b07534930ee72115d897336ac054b..097a2dc07b56ffe5b9419cdc926e4e0b7d6b1f75 100644
--- a/lib/src/compiler.dart
+++ b/lib/src/compiler.dart
@@ -304,10 +304,10 @@ class BatchCompiler extends AbstractCompiler {
}
}
- new File(getOutputPath(source.uri)).openSync(mode: FileMode.WRITE)
- ..writeStringSync(document.outerHtml)
- ..writeStringSync('\n')
- ..closeSync();
+ var outputFile = getOutputPath(source.uri);
+ new File(outputFile)
+ ..createSync(recursive: true)
+ ..writeAsStringSync(document.outerHtml + '\n');
}
html.DocumentFragment _linkLibraries(
« no previous file with comments | « lib/src/codegen/html_codegen.dart ('k') | lib/src/options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698