feat: support for 'chalk/stderr'

fix #301
This commit is contained in:
Pavel Lang 2018-12-27 18:21:46 +01:00
parent 587a5fbcbb
commit 85f99bb677
No known key found for this signature in database
GPG key ID: 623A223A57974B55
4 changed files with 43 additions and 1 deletions

7
stderr.js Normal file
View file

@ -0,0 +1,7 @@
'use strict';
const {stderr: stderrColor} = require('supports-color');
const {constructor: Chalk} = require('.');
module.exports = new Chalk({level: stderrColor ? stderrColor.level : 0});
module.exports.supportsColor = stderrColor;
module.exports.default = module.exports; // For TypeScript