@@ -9,8 +9,8 @@ import 'dart:io';
99import 'package:args/args.dart' ;
1010import 'package:cli_util/cli_util.dart' as cli_util;
1111import 'package:dartdoc/dartdoc.dart' ;
12- import 'package:dartdoc/src/package_meta.dart' ;
1312import 'package:dartdoc/src/config.dart' ;
13+ import 'package:dartdoc/src/package_meta.dart' ;
1414import 'package:path/path.dart' as path;
1515import 'package:stack_trace/stack_trace.dart' ;
1616
@@ -68,22 +68,18 @@ main(List<String> arguments) async {
6868 exit (1 );
6969 }
7070
71- List <String > excludeLibraries =
72- args['exclude' ] == null ? [] : args['exclude' ].split (',' );
73- List <String > includeLibraries =
74- args['include' ] == null ? [] : args['include' ].split (',' );
71+ List <String > excludeLibraries = args['exclude' ];
72+ List <String > includeLibraries = args['include' ];
7573
7674 String url = args['hosted-url' ];
7775 List <String > footerFilePaths = args['footer' ].map (_resolveTildePath).toList ();
78- print (footerFilePaths);
7976 for (String footerFilePath in footerFilePaths) {
8077 if (! new File (footerFilePath).existsSync ()) {
8178 print ("Error: unable to locate footer file: ${footerFilePath }." );
8279 exit (1 );
8380 }
8481 }
8582 List <String > headerFilePaths = args['header' ].map (_resolveTildePath).toList ();
86- print (headerFilePaths);
8783 for (String headerFilePath in footerFilePaths) {
8884 if (! new File (headerFilePath).existsSync ()) {
8985 print ("Error: unable to locate header file: ${headerFilePath }." );
@@ -187,26 +183,23 @@ ArgParser _createArgsParser() {
187183 parser.addOption ('output' ,
188184 help: 'Path to output directory.' , defaultsTo: defaultOutDir);
189185 parser.addOption ('header' ,
190- allowMultiple: true ,
191- help: 'path to file containing HTML text.' );
186+ allowMultiple: true , help: 'path to file containing HTML text.' );
192187 parser.addOption ('footer' ,
193- allowMultiple: true ,
194- help: 'path to file containing HTML text.' );
188+ allowMultiple: true , help: 'path to file containing HTML text.' );
195189 parser.addOption ('exclude' ,
196- help : 'Comma-separated list of library names to ignore. ' );
190+ allowMultiple : true , help : ' library names to ignore' );
197191 parser.addOption ('include' ,
198- help : 'Comma-separated list of library names to generate docs for. ' );
192+ allowMultiple : true , help : ' library names to generate docs for' );
199193 parser.addOption ('hosted-url' ,
200194 help:
201195 'URL where the docs will be hosted (used to generate the sitemap).' );
202196 parser.addOption ('rel-canonical-prefix' ,
203- help: 'If provided, add a rel="canonical" prefixed with provided value. \n '
197+ help:
198+ 'If provided, add a rel="canonical" prefixed with provided value. \n '
204199 'Consider using if building many versions of the docs for public SEO. '
205200 'Learn more at https://goo.gl/gktN6F.' );
206201 parser.addFlag ('include-source' ,
207- help: 'If source code blocks should be shown, if they exist.' ,
208- negatable: true ,
209- defaultsTo: true );
202+ help: 'Show source code blocks' , negatable: true , defaultsTo: true );
210203 return parser;
211204}
212205
0 commit comments