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

Unified Diff: utils/apidoc/mdn/prettyPrint.dart

Issue 10889017: Repair bitrot in the utils/apidoc/mdn/ code. It now runs all the way through, (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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
Index: utils/apidoc/mdn/prettyPrint.dart
===================================================================
--- utils/apidoc/mdn/prettyPrint.dart (revision 11346)
+++ utils/apidoc/mdn/prettyPrint.dart (working copy)
@@ -1,5 +1,10 @@
+/**
+ * Creates database.html, examples.html, and obsolete.html.
+ */
+
#library("prettyPrint");
+#import("dart:io");
#import("dart:json");
#import("util.dart");
@@ -46,8 +51,8 @@
void main() {
// Database of code documentation.
- final Map<String, Map> database = JSON.parse(fs.readFileSync(
- 'output/database.filtered.json', 'utf8'));
+ final Map<String, Map> database = JSON.parse(
+ new File('output/database.filtered.json').readAsTextSync());
// Types we have documentation for.
matchedTypes = new Set<String>();
@@ -332,9 +337,9 @@
</html>
""");
- fs.writeFileSync("output/database.html", sb.toString());
+ writeFileSync("output/database.html", sb.toString());
- fs.writeFileSync("output/examples.html", """
+ writeFileSync("output/examples.html", """
<html>
<head>
<style type="text/css">
@@ -376,7 +381,7 @@
</html>
""");
- fs.writeFileSync("output/obsolete.html", """
+ writeFileSync("output/obsolete.html", """
<html>
<head>
<style type="text/css">
@@ -422,4 +427,4 @@
</body>
</html>
""");
-}
+}

Powered by Google App Engine
This is Rietveld 408576698