Chromium Code Reviews| 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'), |