Skip to content

Commit

Permalink
more terse help output
Browse files Browse the repository at this point in the history
  • Loading branch information
devoncarew committed Apr 26, 2015
1 parent 3ff8788 commit f8a72de
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/src/cli.dart
Expand Up @@ -97,18 +97,17 @@ void printUsageAndDeps(ArgParser parser, Grinder grinder) {

log('');
log('targets:');
log('');

List<GrinderTask> tasks = grinder.tasks.toList();
log(tasks.map((task) {
bool isDefault = grinder.defaultTask == task;
Iterable<GrinderTask> deps = grinder.getImmediateDependencies(task);

String str = '${task}${isDefault ? ' (default)' : ''}\n';
if (task.description != null) str += ' ${task.description}\n';
if (deps.isNotEmpty) str += ' depends on: ${deps.map((t) => t.toString()).join(' ')}\n';
String str = ' ${task}${isDefault ? ' (default)' : ''}\n';
if (task.description != null) str += ' ${task.description}\n';
if (deps.isNotEmpty) str += ' depends on: ${deps.map((t) => t.toString()).join(' ')}\n';
return str;
}).join('\n'));
}).join());
}
}

Expand Down

0 comments on commit f8a72de

Please sign in to comment.