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

Unified Diff: sdk/lib/_internal/dartdoc/bin/dartdoc.dart

Issue 14135007: Add dartdoc to the generated utils snapshot (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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 | « sdk/bin/dartdoc ('k') | utils/compiler/compiler.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/dartdoc/bin/dartdoc.dart
===================================================================
--- sdk/lib/_internal/dartdoc/bin/dartdoc.dart (revision 23522)
+++ sdk/lib/_internal/dartdoc/bin/dartdoc.dart (working copy)
@@ -29,10 +29,18 @@
* Run this from the `lib/_internal/dartdoc` directory.
*/
main() {
+ mainWithOptions(new Options());
+}
+
+/**
+ * We use this to include dartdoc in a single snapshot with dart2js.
+ * (They share 90% of the code)
+ */
+mainWithOptions(Options options) {
// Need this because ArgParser.getUsage doesn't show command invocation.
final USAGE = 'Usage dartdoc [options] <entrypoint(s)>\n[options] include:';
- final args = new Options().arguments;
+ final args = options.arguments;
final dartdoc = new Dartdoc();
@@ -240,8 +248,8 @@
// TODO(amouravski): move compileScript out and pre-generate the client
// scripts. This takes a long time and the js hardly ever changes.
.then((_) => compileScript(dartdoc.mode, dartdoc.outputDir, libPath))
- .then((_) => copyDirectory(scriptDir.append('../static'),
- dartdoc.outputDir))
+ .then((_) => copyDirectory(libPath.append('lib/_internal/dartdoc/static'),
+ dartdoc.outputDir))
.then((_) {
print(dartdoc.status);
if (dartdoc.totals == 0) {
« no previous file with comments | « sdk/bin/dartdoc ('k') | utils/compiler/compiler.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698