fix indent
This commit is contained in:
parent
3d01426a83
commit
34217b0dc0
1 changed files with 9 additions and 9 deletions
18
index.js
18
index.js
|
|
@ -10,15 +10,15 @@ var fs = require('fs');
|
||||||
function Chalk(options) {
|
function Chalk(options) {
|
||||||
// detect mode if not set manually
|
// detect mode if not set manually
|
||||||
this.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled;
|
this.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled;
|
||||||
var configPath = process.cwd() + '/.chalkrc';
|
var configPath = process.cwd() + '/.chalkrc';
|
||||||
if (fs.existsSync(configPath)) {
|
if (fs.existsSync(configPath)) {
|
||||||
var content = JSON.parse(fs.readFileSync(configPath));
|
var content = JSON.parse(fs.readFileSync(configPath));
|
||||||
if (content.overwrite) {
|
if (content.overwrite) {
|
||||||
Object.keys(content.overwrite).forEach(function (key) {
|
Object.keys(content.overwrite).forEach(function (key) {
|
||||||
ansiStyles[key] = ansiStyles[content.overwrite[key]];
|
ansiStyles[key] = ansiStyles[content.overwrite[key]];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// use bright blue on Windows as the normal blue color is illegible
|
// use bright blue on Windows as the normal blue color is illegible
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue