@@ -12,20 +12,20 @@ import 'package:path/path.dart' as path;
12
12
import '../core.dart' ;
13
13
import '../sdk.dart' ;
14
14
15
- /// A command to create a new project from a set of templates .
15
+ /// A command to generate documentation for a project .
16
16
class DocCommand extends DartdevCommand {
17
17
static const String cmdName = 'doc' ;
18
18
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 ) {
25
25
argParser.addOption (
26
26
'output-dir' ,
27
27
abbr: 'o' ,
28
- defaultsTo: path.join ('.' , ' doc' , 'api' ),
28
+ defaultsTo: path.join ('doc' , 'api' ),
29
29
help: 'Output directory' ,
30
30
);
31
31
argParser.addFlag (
@@ -75,8 +75,9 @@ class DocCommand extends DartdevCommand {
75
75
76
76
// Call dartdoc.
77
77
if (verbose) {
78
- log.stdout ('Calling dartdoc with the following options: $options ' );
78
+ log.stdout ('Using the following options: $options ' );
79
79
}
80
+
80
81
final packageConfigProvider = PhysicalPackageConfigProvider ();
81
82
final packageBuilder = PubPackageBuilder (
82
83
config, pubPackageMetaProvider, packageConfigProvider);
0 commit comments