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

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: 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') | utils/apidoc/apidoc.dart » ('J')
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..44f6739950b4e58e1e6b211dbe23da18203622f6 100644
--- a/pkg/dartdoc/bin/dartdoc.dart
+++ b/pkg/dartdoc/bin/dartdoc.dart
@@ -35,6 +35,9 @@ main() {
final argParser = new ArgParser();
+ final libPath = scriptDir.append('../../../');
Lasse Reichstein Nielsen 2012/09/19 12:06:49 final what? I'm guessing Path, but please write it
Bob Nystrom 2012/09/19 16:17:17 For what it's worth, most of the Dartdoc codebase
+ Path pkgPath = scriptDir.append('../../../pkg/');
+
argParser.addFlag('no-code',
help: 'Do not include source code in the documentation.',
defaultsTo: false, negatable: false,
@@ -144,8 +147,16 @@ main() {
}
}, allowMultiple: true);
- final libPath = scriptDir.append('../../../');
- dartdoc.dartdocPath = libPath.append('pkg/dartdoc');
+ 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');
Lasse Reichstein Nielsen 2012/09/19 12:06:49 bad indent?
Johnni Winther 2012/09/20 08:55:59 Done.
if (args.isEmpty()) {
print('No arguments provided.');
@@ -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') | utils/apidoc/apidoc.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698