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

Unified Diff: utils/apidoc/apidoc.dart

Issue 9705088: Generate API docs during build. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix arg parsing. Created 8 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
Index: utils/apidoc/apidoc.dart
diff --git a/utils/apidoc/apidoc.dart b/utils/apidoc/apidoc.dart
index e9009a5706c7c0867d7ff82b9f0d4dd9e4a7a3b4..968546c861567dd91d75b2341552ac54395dfc41 100644
--- a/utils/apidoc/apidoc.dart
+++ b/utils/apidoc/apidoc.dart
@@ -14,6 +14,7 @@
*/
#library('apidoc');
+#import('dart:io');
#import('dart:json');
#import('html_diff.dart');
#import('../../frog/lang.dart');
@@ -29,11 +30,10 @@ void main() {
final args = new Options().arguments;
int mode = doc.MODE_STATIC;
- var outputDir = 'docs';
+ String outputDir = 'docs';
- // Use the output directory if provided.
-
- for (int i = 0; i < args.length - 1; i++) {
+ // Parse the command-line arguments.
+ for (int i = 0; i < args.length; i++) {
final arg = args[i];
switch (arg) {
@@ -83,7 +83,8 @@ void main() {
initializeWorld(files);
print('Parsing MDN data...');
- final mdn = JSON.parse(files.readAll('mdn/database.json'));
+ final mdnFile = new File('${doc.scriptDir}/mdn/database.json');
+ final mdn = JSON.parse(mdnFile.readAsTextSync());
print('Cross-referencing dart:dom and dart:html...');
HtmlDiff.initialize();
« no previous file with comments | « lib/dartdoc/dartdoc.dart ('k') | utils/apidoc/apidoc.gyp » ('j') | utils/apidoc/apidoc.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698