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

Unified Diff: utils/apidoc/apidoc.dart

Issue 14736010: Add a new --extra-lib option to apidoc that allows us to specify an explicit .dart file that should… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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 | « pkg/unittest/lib/unittest.dart ('k') | utils/apidoc/apidoc.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/apidoc/apidoc.dart
===================================================================
--- utils/apidoc/apidoc.dart (revision 22469)
+++ utils/apidoc/apidoc.dart (working copy)
@@ -40,6 +40,7 @@
List<String> excludedLibraries = <String>[];
List<String> includedLibraries = <String>[];
Andrei Mouravski 2013/05/08 10:43:47 You need to be more clear about this. Why is inclu
gram 2013/05/08 22:14:36 I added some comments in the code, but the long st
+ List<String> extraLibraries = <String>[]; // Libs with explicit paths.
String packageRoot;
String version;
@@ -65,6 +66,8 @@
excludedLibraries.add(arg.substring('--exclude-lib='.length));
} else if (arg.startsWith('--include-lib=')) {
includedLibraries.add(arg.substring('--include-lib='.length));
+ } else if (arg.startsWith('--extra-lib=')) {
+ extraLibraries.add(arg.substring('--extra-lib='.length));
} else if (arg.startsWith('--out=')) {
outputDir = new Path(arg.substring('--out='.length));
} else if (arg.startsWith('--package-root=')) {
@@ -140,6 +143,16 @@
}
}
}, onDone: () {
+ // Add any --extra libraries that had full pkg paths.
Andrei Mouravski 2013/05/08 10:43:47 This feels really hacky, so please add a TODO here
gram 2013/05/08 22:14:36 Done.
+ for (var lib in extraLibraries) {
+ var libPath = new Path('../../$lib');
+ if (new File.fromPath(libPath).existsSync()) {
+ apidocLibraries.add(_pathToFileUri(libPath.toNativePath()));
+ var libName = libPath.filename.replaceAll('.dart', '');
+ includedLibraries.add(libName);
+ }
+ }
+
final apidoc = new Apidoc(mdn, outputDir, mode, generateAppCache,
excludedLibraries, version);
apidoc.dartdocPath =
« no previous file with comments | « pkg/unittest/lib/unittest.dart ('k') | utils/apidoc/apidoc.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698