supports-color-cli
Advanced tools
Comparing version 1.0.0 to 1.1.0
18
cli.js
@@ -6,6 +6,15 @@ #!/usr/bin/env node | ||
meow({ | ||
var cli = meow({ | ||
help: [ | ||
'Example', | ||
'Usage', | ||
' $ supports-color [--<256|16m>]', | ||
'', | ||
'Options', | ||
' --256 Check for 256 color support', | ||
' --16m Check for 16 million color support (True Color)', | ||
'', | ||
'Examples', | ||
' $ supports-color', | ||
' $ supports-color --256', | ||
' $ supports-color --16m', | ||
'', | ||
@@ -16,2 +25,5 @@ 'Exits with code 0 if color is supported and 1 if not' | ||
process.exit(supportsColor ? 0 : 1); | ||
var flags = cli.flags; | ||
var level = flags['256'] ? 'has256' : flags['16m'] ? 'has16m' : 'hasBasic'; | ||
process.exit(supportsColor[level] ? 0 : 1); |
{ | ||
"name": "supports-color-cli", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Detect whether a terminal supports color", | ||
@@ -14,3 +14,4 @@ "license": "MIT", | ||
"Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)", | ||
"Joshua Appelman <jappelman@xebia.com> (jbnicolai.com)" | ||
"Joshua Appelman <jappelman@xebia.com> (jbnicolai.com)", | ||
"JD Ballard <i.am.qix@gmail.com> (github.com/qix-)" | ||
], | ||
@@ -52,3 +53,3 @@ "bin": { | ||
"meow": "^3.3.0", | ||
"supports-color": "^2.0.0" | ||
"supports-color": "^3.0.0" | ||
}, | ||
@@ -55,0 +56,0 @@ "devDependencies": { |
@@ -18,4 +18,13 @@ # supports-color-cli [![Build Status](https://travis-ci.org/chalk/supports-color-cli.svg?branch=master)](https://travis-ci.org/chalk/supports-color-cli) | ||
Example | ||
Usage | ||
$ supports-color [--<256|16m>] | ||
Options | ||
--256 Check for 256 color support | ||
--16m Check for 16 million color support (True Color) | ||
Examples | ||
$ supports-color | ||
$ supports-color --256 | ||
$ supports-color --16m | ||
@@ -22,0 +31,0 @@ Exits with code 0 if color is supported and 1 if not |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3678
24
44
+ Addedhas-flag@1.0.0(transitive)
+ Addedsupports-color@3.2.3(transitive)
- Removedsupports-color@2.0.0(transitive)
Updatedsupports-color@^3.0.0