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

Unified Diff: utils/apidoc/apidoc.dart

Issue 11260045: Add logic to exclude certain libraries from API doc. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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/dartdoc/lib/dartdoc.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
diff --git a/utils/apidoc/apidoc.dart b/utils/apidoc/apidoc.dart
index d5981f56a6bb434f5b8c5e058cfbb1c4eba74924..8e016f3599cf84376e5d576f22c3358607366c3a 100644
--- a/utils/apidoc/apidoc.dart
+++ b/utils/apidoc/apidoc.dart
@@ -33,6 +33,8 @@ void main() {
Path outputDir = new Path('docs');
bool generateAppCache = false;
+ List<String> excludedLibraries = <String>[];
+
// Parse the command-line arguments.
for (int i = 0; i < args.length; i++) {
final arg = args[i];
@@ -51,7 +53,9 @@ void main() {
break;
default:
- if (arg.startsWith('--out=')) {
+ if (arg.startsWith('--exclude-lib=')) {
+ excludedLibraries.add(arg.substring('--exclude-lib='.length));
+ } else if (arg.startsWith('--out=')) {
outputDir = new Path.fromNative(arg.substring('--out='.length));
} else {
print('Unknown option: $arg');
@@ -130,7 +134,8 @@ void main() {
lister.onDone = (success) {
print('Generating docs...');
- final apidoc = new Apidoc(mdn, htmldoc, outputDir, mode, generateAppCache);
+ final apidoc = new Apidoc(mdn, htmldoc, outputDir, mode, generateAppCache,
+ excludedLibraries);
apidoc.dartdocPath = doc.scriptDir.append('../../pkg/dartdoc/');
// Select the libraries to include in the produced documentation:
apidoc.includeApi = true;
@@ -258,7 +263,11 @@ class Apidoc extends doc.Dartdoc {
String mdnUrl = null;
Apidoc(this.mdn, this.htmldoc, Path outputDir, int mode,
- bool generateAppCache) {
+ bool generateAppCache, [excludedLibraries]) {
+ if (?excludedLibraries) {
+ this.excludedLibraries = excludedLibraries;
+ }
+
this.outputDir = outputDir;
this.mode = mode;
this.generateAppCache = generateAppCache;
« no previous file with comments | « pkg/dartdoc/lib/dartdoc.dart ('k') | utils/apidoc/apidoc.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698