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: Port list_files back to python. 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 8fff77ada207455663283f3729b1d9f8b648895c..a7d9d8ea76b4f91857e8f5bb30264fc3fce38f60 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');
@@ -45,14 +46,15 @@ void main() {
}
final frogPath = joinPaths(doc.scriptDir, '../../frog/');
+ final libDir = joinPaths(frogPath, 'lib');
+ final compilerPath = joinPaths(frogPath, 'minfrog');
dgrove 2012/03/30 17:46:31 minfrog is going away. why not just run frog out o
Bob Nystrom 2012/03/30 18:01:40 There will be enormous changes to dartdoc and apid
dgrove 2012/03/30 18:16:25 yes. this can wait, given the reality that there w
doc.cleanOutputDirectory(outputDir);
// Compile the client-side code to JS.
- // TODO(bob): Right path.
- doc.compileScript(frogPath,
- '${doc.scriptDir}/../../lib/dartdoc/client-live-nav.dart',
- '${outputDir}/client-live-nav.js');
+ doc.compileScript(compilerPath, libDir,
+ joinPaths(doc.scriptDir, '/../../lib/dartdoc/client-live-nav.dart'),
+ joinPaths(outputDir, 'client-live-nav.js'));
// TODO(rnystrom): Use platform-specific path separator.
// The basic dartdoc-provided static content.
@@ -66,7 +68,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();

Powered by Google App Engine
This is Rietveld 408576698