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

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

Issue 161893002: Automatically pass SDK into docgen.dart, and use the SDK for running (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 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/docgen/lib/docgen.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/docgen/bin/docgen.dart
===================================================================
--- pkg/docgen/bin/docgen.dart (revision 32622)
+++ pkg/docgen/bin/docgen.dart (working copy)
@@ -35,6 +35,12 @@
var scriptDir = path.dirname(Platform.script.toFilePath());
var introduction = includeSdk ? '' : options['introduction'];
+ var pubScript = options['sdk'] != null ?
+ path.join(options['sdk'], 'bin', 'pub') : 'pub';
+
+ var dartBinary = options['sdk'] != null ?
+ path.join(options['sdk'], 'bin', 'dart') : 'dart';
+
docgen(_files,
packageRoot: options['package-root'],
outputToYaml: !options['json'],
@@ -47,6 +53,8 @@
excludeLibraries: excludedLibraries,
includeDependentPackages: options['include-dependent-packages'],
serve: options['serve'],
+ dartBinary: dartBinary,
+ pubScript: pubScript,
noDocs: options['no-docs'],
startPage: startPage);
}
@@ -136,6 +144,9 @@
'in the directory with its pubspec. Includes documentation for all '
'of its dependent packages.',
defaultsTo: true, negatable: true);
+ parser.addOption('sdk',
+ help: 'SDK directory',
+ defaultsTo: null);
parser.addOption('start-page',
help: 'By default the viewer will start at the SDK introduction page.'
'To start at some other page, e.g. for a package, provide the name '
« no previous file with comments | « no previous file | pkg/docgen/lib/docgen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698