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

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

Issue 10950025: Dartdoc supports package directory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments Created 8 years, 3 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 | « no previous file | pkg/dartdoc/lib/dartdoc.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dartdoc/bin/dartdoc.dart
diff --git a/pkg/dartdoc/bin/dartdoc.dart b/pkg/dartdoc/bin/dartdoc.dart
index 4c58b9671ce5ce8743bf1d849ab1b27764135d02..4bddd7248ec15dd053dfc20a988906d43f19e510 100644
--- a/pkg/dartdoc/bin/dartdoc.dart
+++ b/pkg/dartdoc/bin/dartdoc.dart
@@ -35,6 +35,9 @@ main() {
final argParser = new ArgParser();
+ final Path libPath = scriptDir.append('../../../');
+ Path pkgPath = scriptDir.append('../../../pkg/');
+
argParser.addFlag('no-code',
help: 'Do not include source code in the documentation.',
defaultsTo: false, negatable: false,
@@ -144,7 +147,15 @@ main() {
}
}, allowMultiple: true);
- final libPath = scriptDir.append('../../../');
+ argParser.addOption('pkg',
+ help: 'Sets the package directory to the specified directory.\n'
+ 'If omitted the package directory is the SDK pkg/ dir',
+ callback: (pkgDir) {
+ if(pkgDir != null) {
+ pkgPath = new Path.fromNative(pkgDir);
+ }
+ });
+
dartdoc.dartdocPath = libPath.append('pkg/dartdoc');
if (args.isEmpty()) {
@@ -175,7 +186,7 @@ main() {
cleanOutputDirectory(dartdoc.outputDir);
- dartdoc.documentLibraries(entrypoints, libPath);
+ dartdoc.documentLibraries(entrypoints, libPath, pkgPath);
Future compiled = compileScript(dartdoc.mode, dartdoc.outputDir, libPath);
Future filesCopied = copyDirectory(scriptDir.append('../static'),
« no previous file with comments | « no previous file | pkg/dartdoc/lib/dartdoc.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698