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

Side by Side Diff: pkg/docgen/bin/docgen.dart

Issue 108473004: Adds a --include-dependent-packages option to docgen (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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 | « no previous file | pkg/docgen/lib/docgen.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 import 'dart:io'; 5 import 'dart:io';
6 6
7 import 'package:args/args.dart'; 7 import 'package:args/args.dart';
8 import 'package:logging/logging.dart'; 8 import 'package:logging/logging.dart';
9 9
10 import '../lib/docgen.dart'; 10 import '../lib/docgen.dart';
(...skipping 16 matching lines...) Expand all
27 var introduction = includeSdk ? introFile : results['introduction']; 27 var introduction = includeSdk ? introFile : results['introduction'];
28 docgen(results.rest.map(path.normalize).toList(), 28 docgen(results.rest.map(path.normalize).toList(),
29 packageRoot: results['package-root'], 29 packageRoot: results['package-root'],
30 outputToYaml: !results['json'], 30 outputToYaml: !results['json'],
31 includePrivate: results['include-private'], 31 includePrivate: results['include-private'],
32 includeSdk: includeSdk, 32 includeSdk: includeSdk,
33 parseSdk: results['parse-sdk'], 33 parseSdk: results['parse-sdk'],
34 append: results['append'] && new Directory(results['out']).existsSync(), 34 append: results['append'] && new Directory(results['out']).existsSync(),
35 introduction: introduction, 35 introduction: introduction,
36 out: results['out'], 36 out: results['out'],
37 excludeLibraries: excludedLibraries); 37 excludeLibraries: excludedLibraries,
38 includeDependentPackages: results['include-dependent-packages']);
38 } 39 }
39 40
40 /** 41 /**
41 * Creates parser for docgen command line arguments. 42 * Creates parser for docgen command line arguments.
42 */ 43 */
43 ArgParser _initArgParser() { 44 ArgParser _initArgParser() {
44 var parser = new ArgParser(); 45 var parser = new ArgParser();
45 parser.addFlag('help', abbr: 'h', 46 parser.addFlag('help', abbr: 'h',
46 help: 'Prints help and usage information.', 47 help: 'Prints help and usage information.',
47 negatable: false, 48 negatable: false,
(...skipping 29 matching lines...) Expand all
77 parser.addOption('introduction', 78 parser.addOption('introduction',
78 help: 'Adds the provided markdown text file as the introduction' 79 help: 'Adds the provided markdown text file as the introduction'
79 ' for the outputted documentation.', defaultsTo: ''); 80 ' for the outputted documentation.', defaultsTo: '');
80 parser.addOption('out', 81 parser.addOption('out',
81 help: 'The name of the output directory.', 82 help: 'The name of the output directory.',
82 defaultsTo: 'docs'); 83 defaultsTo: 'docs');
83 parser.addOption('exclude-lib', 84 parser.addOption('exclude-lib',
84 help: 'Exclude the library by this name from the documentation', 85 help: 'Exclude the library by this name from the documentation',
85 allowMultiple: true, 86 allowMultiple: true,
86 callback: (libs) => excludedLibraries.addAll(libs)); 87 callback: (libs) => excludedLibraries.addAll(libs));
88 parser.addFlag('include-dependent-packages',
89 help: 'Assumes we are documenting a single package and are running '
90 'in the directory with its pubspec. Includes documentation for all '
91 'of its dependent packages.',
92 defaultsTo: false, negatable: false);
87 return parser; 93 return parser;
88 } 94 }
OLDNEW
« 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