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

Unified Diff: pkg/docgen/bin/docgen.dart

Issue 73113002: Generate docgen output along with api_docs as part of the build (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Changed where it's trying to upload to Created 7 years, 1 month 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 | « editor/build/build.py ('k') | pkg/docgen/bin/sdk-introduction.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/docgen/bin/docgen.dart
diff --git a/pkg/docgen/bin/docgen.dart b/pkg/docgen/bin/docgen.dart
index cb045378ef144b675a28fd6604519e6fee4aa8f7..d81e5bc7c6373ea09ab81a0b21635dcda2011a6c 100644
--- a/pkg/docgen/bin/docgen.dart
+++ b/pkg/docgen/bin/docgen.dart
@@ -10,6 +10,8 @@ import 'package:logging/logging.dart';
import '../lib/docgen.dart';
import 'package:path/path.dart' as path;
+List<String> excludedLibraries = [];
+
/**
* Analyzes Dart files and generates a representation of included libraries,
* classes, and members.
@@ -18,15 +20,21 @@ void main(List<String> arguments) {
logger.onRecord.listen((record) => print(record.message));
var results = _initArgParser().parse(arguments);
+ var includeSdk = results['parse-sdk'] || results['include-sdk'];
+ var scriptDir = path.dirname(Platform.script.toFilePath());
+ var introFile =
+ path.join(path.dirname(scriptDir), 'doc', 'sdk-introduction.md');
+ var introduction = includeSdk ? introFile : results['introduction'];
docgen(results.rest.map(path.normalize).toList(),
packageRoot: results['package-root'],
outputToYaml: !results['json'],
includePrivate: results['include-private'],
- includeSdk: results['parse-sdk'] || results['include-sdk'],
+ includeSdk: includeSdk,
parseSdk: results['parse-sdk'],
- append: results['append'] && new Directory('docs').existsSync(),
- introduction: (results['parse-sdk'] || results['include-sdk']) ?
- 'sdk-introduction.md' : results['introduction']);
+ append: results['append'] && new Directory(results['out']).existsSync(),
+ introduction: introduction,
+ out: results['out'],
+ excludeLibraries: excludedLibraries);
}
/**
@@ -69,6 +77,12 @@ ArgParser _initArgParser() {
parser.addOption('introduction',
help: 'Adds the provided markdown text file as the introduction'
' for the outputted documentation.', defaultsTo: '');
-
+ parser.addOption('out',
+ help: 'The name of the output directory.',
+ defaultsTo: 'docs');
+ parser.addOption('exclude-lib',
+ help: 'Exclude the library by this name from the documentation',
+ allowMultiple: true,
+ callback: (libs) => excludedLibraries.addAll(libs));
return parser;
}
« no previous file with comments | « editor/build/build.py ('k') | pkg/docgen/bin/sdk-introduction.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698