Default --color to true when using a terminal

This commit is contained in:
Natalie Weizenbaum 2017-07-09 18:28:39 -07:00
parent 1bbbf4f593
commit 9f85a4dc34
2 changed files with 6 additions and 1 deletions

View File

@ -6,6 +6,10 @@
than `transparent`. This works around a bug wherein IE incorrectly handles the
latter format.
### Command-Line Interface
* Improve the logic for whether to use terminal colors by default.
### Node JS API
* Add support for `data`, `includePaths`, `indentedSyntax`, `lineFeed`,

View File

@ -45,7 +45,8 @@ main(List<String> args) async {
return;
}
var color = (options['color'] as bool) ?? hasTerminal;
var color =
options.wasParsed('color') ? options['color'] as bool : hasTerminal;
try {
var css = compile(options.rest.first, color: color);
if (css.isNotEmpty) print(css);