Chromium Code Reviews| Index: utils/apidoc/apidoc.dart |
| =================================================================== |
| --- utils/apidoc/apidoc.dart (revision 22469) |
| +++ utils/apidoc/apidoc.dart (working copy) |
| @@ -40,6 +40,7 @@ |
| List<String> excludedLibraries = <String>[]; |
| List<String> includedLibraries = <String>[]; |
|
Andrei Mouravski
2013/05/08 10:43:47
You need to be more clear about this. Why is inclu
gram
2013/05/08 22:14:36
I added some comments in the code, but the long st
|
| + List<String> extraLibraries = <String>[]; // Libs with explicit paths. |
| String packageRoot; |
| String version; |
| @@ -65,6 +66,8 @@ |
| excludedLibraries.add(arg.substring('--exclude-lib='.length)); |
| } else if (arg.startsWith('--include-lib=')) { |
| includedLibraries.add(arg.substring('--include-lib='.length)); |
| + } else if (arg.startsWith('--extra-lib=')) { |
| + extraLibraries.add(arg.substring('--extra-lib='.length)); |
| } else if (arg.startsWith('--out=')) { |
| outputDir = new Path(arg.substring('--out='.length)); |
| } else if (arg.startsWith('--package-root=')) { |
| @@ -140,6 +143,16 @@ |
| } |
| } |
| }, onDone: () { |
| + // Add any --extra libraries that had full pkg paths. |
|
Andrei Mouravski
2013/05/08 10:43:47
This feels really hacky, so please add a TODO here
gram
2013/05/08 22:14:36
Done.
|
| + for (var lib in extraLibraries) { |
| + var libPath = new Path('../../$lib'); |
| + if (new File.fromPath(libPath).existsSync()) { |
| + apidocLibraries.add(_pathToFileUri(libPath.toNativePath())); |
| + var libName = libPath.filename.replaceAll('.dart', ''); |
| + includedLibraries.add(libName); |
| + } |
| + } |
| + |
| final apidoc = new Apidoc(mdn, outputDir, mode, generateAppCache, |
| excludedLibraries, version); |
| apidoc.dartdocPath = |