This repository has been archived by the owner on Jun 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
61 lines (61 loc) · 3.95 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{
"name": "chalk",
"version": "0.3.0",
"description": "Terminal string styling done right",
"keywords": [
"color",
"colour",
"colors",
"terminal",
"console",
"cli",
"string",
"ansi",
"styles",
"tty",
"formatting",
"rgb",
"256",
"shell",
"xterm",
"log",
"logging",
"command-line",
"text"
],
"homepage": "https://github.com/sindresorhus/chalk",
"bugs": {
"url": "https://github.com/sindresorhus/chalk/issues"
},
"license": "MIT",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "http://sindresorhus.com"
},
"files": [
"chalk.js"
],
"main": "chalk",
"repository": {
"type": "git",
"url": "git://github.com/sindresorhus/chalk.git"
},
"scripts": {
"test": "mocha"
},
"dependencies": {
"has-color": "~0.1.0",
"ansi-styles": "~0.2.0"
},
"devDependencies": {
"mocha": "~1.12.0"
},
"engines": {
"node": ">=0.8.0"
},
"readme": "# chalk [![Build Status](https://secure.travis-ci.org/sindresorhus/chalk.png?branch=master)](http://travis-ci.org/sindresorhus/chalk)\n\n> Terminal string styling done right.\n\n[colors.js](https://github.com/Marak/colors.js) is currently the most popular string styling module, but it has serious deficiencies like extending String.prototype which causes all kinds of problems. Although there are other ones, they either do too much or not enough.\n\n**Chalk is a clean and focused alternative.**\n\n![screenshot](screenshot.png)\n\n\n## Why\n\n- **Doesn't extend String.prototype**\n- Expressive API\n- Clean and focused\n- Auto-detects color support\n- Actively maintained\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/chalk): `npm install --save chalk`\n\n\n## Example\n\nChalk comes with an easy to use composable API where you just chain the styles you want.\n\n```js\nvar chalk = require('chalk');\n\n// style a string\nconsole.log(chalk.blue('Hello world!'));\n\n// combine styled and normal strings\nconsole.log(chalk.blue('Hello'), 'World' + chalk.red('!'));\n\n// compose multiple styles using the chainable API\nconsole.log(chalk.blue.bgRed.bold('Hello world!'));\n\n// nest styles\nchalk.red('Hello', chalk.underline.bgBlue('world') + '!');\n\n// pass in multiple arguments\nconsole.log(chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz')) \n```\n\nYou can easily define your own themes.\n\n```js\nvar chalk = require('chalk');\nvar error = chalk.bold.red;\nconsole.log(error('Error!'));\n```\n\n\n## API\n\n### chalk.\\<style>\\[.\\<style>...](string)\n\nChain [styles](#styles) and call the last one as a method with a string argument.\n\nMultiple arguments are also supported. Chalk will add a space between each one.\n\n### chalk.enabled\n\nColor support is automatically detected, but you can override it.\n\n### chalk.supportsColor\n\nDetect whether the terminal [supports color](https://github.com/sindresorhus/has-color).\n\nCan be overridden by the user with the flags `--color` and `--no-color`.\n\nUsed internally and handled for you, but exposed for convenience.\n\n### chalk.styles\n\nExposes the styles as [ANSI escape codes](https://github.com/sindresorhus/ansi-styles).\n\n```js\nvar chalk = require('chalk');\n\nconsole.log(chalk.styles.red);\n//=> ['\\x1b[31m', '\\x1b[39m']\n\nconsole.log(chalk.styles.red[0] + 'Hello' + chalk.styles.red[1]);\n// first item is the style escape code and second is the reset escape code\n```\n\n### chalk.stripColor(string)\n\nStrip color from a string.\n\n\n## Styles\n\n### General\n\n- reset\n- bold\n- italic\n- underline\n- inverse\n- strikethrough\n\n### Text colors\n\n- black\n- red\n- green\n- yellow\n- blue\n- magenta\n- cyan\n- white\n- gray\n\n### Background colors\n\n- bgBlack\n- bgRed\n- bgGreen\n- bgYellow\n- bgBlue\n- bgMagenta\n- bgCyan\n- bgWhite\n\n\n## License\n\nMIT License • © [Sindre Sorhus](http://sindresorhus.com)\n",
"readmeFilename": "readme.md",
"_id": "chalk@0.3.0",
"_from": "chalk@~0.3.0"
}