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

Side by Side Diff: sdk/lib/_internal/dartdoc/bin/dartdoc.dart

Issue 12782016: Switch pkg packages, pub, and dartdoc to use package: imports. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes. Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/bin/dartdoc.bat ('k') | sdk/lib/_internal/dartdoc/lib/universe_serializer.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * To generate docs for a library, run this script with the path to an 6 * To generate docs for a library, run this script with the path to an
7 * entrypoint .dart file, like: 7 * entrypoint .dart file, like:
8 * 8 *
9 * $ dart dartdoc.dart foo.dart 9 * $ dart dartdoc.dart foo.dart
10 * 10 *
11 * This will create a "docs" directory with the docs for your libraries. To 11 * This will create a "docs" directory with the docs for your libraries. To
12 * create these beautiful docs, dartdoc parses your library and every library 12 * create these beautiful docs, dartdoc parses your library and every library
13 * it imports (recursively). From each library, it parses all classes and 13 * it imports (recursively). From each library, it parses all classes and
14 * members, finds the associated doc comments and builds crosslinked docs from 14 * members, finds the associated doc comments and builds crosslinked docs from
15 * them. 15 * them.
16 */ 16 */
17 library dartdoc; 17 library dartdoc;
18 18
19 import 'dart:async'; 19 import 'dart:async';
20 import 'dart:io'; 20 import 'dart:io';
21 21
22 // TODO(rnystrom): Use "package:" URL (#4968).
22 import '../lib/dartdoc.dart'; 23 import '../lib/dartdoc.dart';
23 24 import 'package:args/args.dart';
24 // TODO(rnystrom): Use "package:" URL (#4968). 25 import 'package:pathos/path.dart' as path;
25 import '../../../../../pkg/args/lib/args.dart';
26 import '../../../../../pkg/pathos/lib/path.dart' as path;
27 26
28 /** 27 /**
29 * Run this from the `lib/_internal/dartdoc` directory. 28 * Run this from the `lib/_internal/dartdoc` directory.
30 */ 29 */
31 main() { 30 main() {
32 // Need this because ArgParser.getUsage doesn't show command invocation. 31 // Need this because ArgParser.getUsage doesn't show command invocation.
33 final USAGE = 'Usage dartdoc [options] <entrypoint(s)>\n[options] include:'; 32 final USAGE = 'Usage dartdoc [options] <entrypoint(s)>\n[options] include:';
34 33
35 final args = new Options().arguments; 34 final args = new Options().arguments;
36 35
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 if (dartdoc.totals == 0) { 249 if (dartdoc.totals == 0) {
251 exit(1); 250 exit(1);
252 } 251 }
253 }) 252 })
254 .catchError((e) { 253 .catchError((e) {
255 print('Error: generation failed: ${e.error}'); 254 print('Error: generation failed: ${e.error}');
256 exit(1); 255 exit(1);
257 }) 256 })
258 .whenComplete(() => dartdoc.cleanup()); 257 .whenComplete(() => dartdoc.cleanup());
259 } 258 }
OLDNEW
« no previous file with comments | « sdk/bin/dartdoc.bat ('k') | sdk/lib/_internal/dartdoc/lib/universe_serializer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698