add support for chalk/stderr (closes #301)

This commit is contained in:
Josh Junon 2019-07-12 19:19:53 +02:00
parent c25c32a25f
commit ba3274ad0c
6 changed files with 264 additions and 225 deletions

12
stderr.js Normal file
View file

@ -0,0 +1,12 @@
const {stderr: stderrColor} = require('supports-color');
const chalkFactory = require('./source/factory');
class ChalkStderr {
constructor(options) {
return chalkFactory(stderrColor, ChalkStderr, options);
}
}
module.exports = chalkFactory(stderrColor, ChalkStderr);
module.exports.supportsColor = stderrColor;