Skip to content

Commit 0a9fb17

Browse files
devoncarewCommit Bot
authored and
Commit Bot
committed
[dartdev] update help text for 'dart doc'
Change-Id: Iac786b3dd471c4650e42aefacdddb177370f38f5 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/227921 Reviewed-by: Ben Konyi <[email protected]> Commit-Queue: Devon Carew <[email protected]>
1 parent 0a3d896 commit 0a9fb17

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

pkg/dartdev/lib/src/commands/doc.dart

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@ import 'package:path/path.dart' as path;
1212
import '../core.dart';
1313
import '../sdk.dart';
1414

15-
/// A command to create a new project from a set of templates.
15+
/// A command to generate documentation for a project.
1616
class DocCommand extends DartdevCommand {
1717
static const String cmdName = 'doc';
1818

19-
DocCommand({bool verbose = false})
20-
: super(
21-
cmdName,
22-
'Generate HTML API documentation from Dart documentation comments.',
23-
verbose,
24-
) {
19+
static const String cmdDescription = '''
20+
Generate API documentation for Dart projects.
21+
22+
For additional documentation generation options, see the 'dartdoc_options.yaml' file documentation at https://dart.dev/go/dartdoc-options-file.''';
23+
24+
DocCommand({bool verbose = false}) : super(cmdName, cmdDescription, verbose) {
2525
argParser.addOption(
2626
'output-dir',
2727
abbr: 'o',
28-
defaultsTo: path.join('.', 'doc', 'api'),
28+
defaultsTo: path.join('doc', 'api'),
2929
help: 'Output directory',
3030
);
3131
argParser.addFlag(
@@ -75,8 +75,9 @@ class DocCommand extends DartdevCommand {
7575

7676
// Call dartdoc.
7777
if (verbose) {
78-
log.stdout('Calling dartdoc with the following options: $options');
78+
log.stdout('Using the following options: $options');
7979
}
80+
8081
final packageConfigProvider = PhysicalPackageConfigProvider();
8182
final packageBuilder = PubPackageBuilder(
8283
config, pubPackageMetaProvider, packageConfigProvider);

0 commit comments

Comments
 (0)