forked from orbit-oss/chalk
parent
fb6332df4f
commit
409f95eef5
6 changed files with 13 additions and 18 deletions
|
|
@ -7,7 +7,7 @@ charset = utf-8
|
|||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[package.json]
|
||||
[{package.json,*.yml}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
|
|
|
|||
13
.jshintrc
13
.jshintrc
|
|
@ -1,13 +0,0 @@
|
|||
{
|
||||
"node": true,
|
||||
"esnext": true,
|
||||
"bitwise": true,
|
||||
"camelcase": true,
|
||||
"curly": true,
|
||||
"immed": true,
|
||||
"newcap": true,
|
||||
"noarg": true,
|
||||
"undef": true,
|
||||
"unused": "vars",
|
||||
"strict": true
|
||||
}
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
/* globals set bench */
|
||||
'use strict';
|
||||
var chalk = require('./');
|
||||
|
||||
suite('chalk', function () {
|
||||
|
|
|
|||
2
index.js
2
index.js
|
|
@ -44,7 +44,7 @@ function build(_styles) {
|
|||
builder.enabled = this.enabled;
|
||||
// __proto__ is used because we must return a function, but there is
|
||||
// no way to create a function with a different prototype.
|
||||
/*eslint no-proto: 0 */
|
||||
/* eslint-disable no-proto */
|
||||
builder.__proto__ = proto;
|
||||
|
||||
return builder;
|
||||
|
|
|
|||
11
package.json
11
package.json
|
|
@ -13,7 +13,7 @@
|
|||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha",
|
||||
"test": "xo && mocha",
|
||||
"bench": "matcha benchmark.js",
|
||||
"coverage": "nyc npm test && nyc report",
|
||||
"coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls"
|
||||
|
|
@ -58,6 +58,13 @@
|
|||
"nyc": "^3.0.0",
|
||||
"require-uncached": "^1.0.2",
|
||||
"resolve-from": "^1.0.0",
|
||||
"semver": "^4.3.3"
|
||||
"semver": "^4.3.3",
|
||||
"xo": "*"
|
||||
},
|
||||
"xo": {
|
||||
"envs": [
|
||||
"node",
|
||||
"mocha"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
1
test.js
1
test.js
|
|
@ -119,7 +119,6 @@ describe('chalk on windows', function () {
|
|||
var chalkCtx = requireUncached('./');
|
||||
assert.equal(chalkCtx.blue.dim('foo'), '\u001b[94m\u001b[2mfoo\u001b[22m\u001b[39m');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe('chalk.enabled', function () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue