From abd94a7f5a50f43c797a11b53549ae48fff667c3 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 10 Oct 2016 03:43:44 +0200 Subject: add node_modules to address #4364 --- node_modules/nomnom/.npmignore | 1 + node_modules/nomnom/LICENSE | 20 + node_modules/nomnom/README.md | 325 ++++++++++++ node_modules/nomnom/node_modules/.bin/strip-ansi | 1 + .../nomnom/node_modules/ansi-styles/ansi-styles.js | 38 ++ .../nomnom/node_modules/ansi-styles/package.json | 109 ++++ .../nomnom/node_modules/ansi-styles/readme.md | 65 +++ node_modules/nomnom/node_modules/chalk/index.js | 63 +++ .../nomnom/node_modules/chalk/package.json | 111 ++++ node_modules/nomnom/node_modules/chalk/readme.md | 158 ++++++ node_modules/nomnom/node_modules/strip-ansi/cli.js | 27 + .../nomnom/node_modules/strip-ansi/index.js | 4 + .../nomnom/node_modules/strip-ansi/package.json | 115 ++++ .../nomnom/node_modules/strip-ansi/readme.md | 46 ++ node_modules/nomnom/nomnom.js | 584 +++++++++++++++++++++ node_modules/nomnom/num-vals-fix.diff | 31 ++ node_modules/nomnom/package.json | 91 ++++ node_modules/nomnom/test.js | 23 + node_modules/nomnom/test/callback.js | 33 ++ node_modules/nomnom/test/commands.js | 120 +++++ node_modules/nomnom/test/expected.js | 60 +++ node_modules/nomnom/test/matching.js | 70 +++ node_modules/nomnom/test/option.js | 44 ++ node_modules/nomnom/test/transform.js | 65 +++ node_modules/nomnom/test/usage.js | 121 +++++ node_modules/nomnom/test/values.js | 75 +++ 26 files changed, 2400 insertions(+) create mode 100644 node_modules/nomnom/.npmignore create mode 100644 node_modules/nomnom/LICENSE create mode 100644 node_modules/nomnom/README.md create mode 120000 node_modules/nomnom/node_modules/.bin/strip-ansi create mode 100644 node_modules/nomnom/node_modules/ansi-styles/ansi-styles.js create mode 100644 node_modules/nomnom/node_modules/ansi-styles/package.json create mode 100644 node_modules/nomnom/node_modules/ansi-styles/readme.md create mode 100644 node_modules/nomnom/node_modules/chalk/index.js create mode 100644 node_modules/nomnom/node_modules/chalk/package.json create mode 100644 node_modules/nomnom/node_modules/chalk/readme.md create mode 100755 node_modules/nomnom/node_modules/strip-ansi/cli.js create mode 100644 node_modules/nomnom/node_modules/strip-ansi/index.js create mode 100644 node_modules/nomnom/node_modules/strip-ansi/package.json create mode 100644 node_modules/nomnom/node_modules/strip-ansi/readme.md create mode 100644 node_modules/nomnom/nomnom.js create mode 100644 node_modules/nomnom/num-vals-fix.diff create mode 100644 node_modules/nomnom/package.json create mode 100644 node_modules/nomnom/test.js create mode 100644 node_modules/nomnom/test/callback.js create mode 100644 node_modules/nomnom/test/commands.js create mode 100644 node_modules/nomnom/test/expected.js create mode 100644 node_modules/nomnom/test/matching.js create mode 100644 node_modules/nomnom/test/option.js create mode 100644 node_modules/nomnom/test/transform.js create mode 100644 node_modules/nomnom/test/usage.js create mode 100644 node_modules/nomnom/test/values.js (limited to 'node_modules/nomnom') diff --git a/node_modules/nomnom/.npmignore b/node_modules/nomnom/.npmignore new file mode 100644 index 000000000..3c3629e64 --- /dev/null +++ b/node_modules/nomnom/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/node_modules/nomnom/LICENSE b/node_modules/nomnom/LICENSE new file mode 100644 index 000000000..8092929fe --- /dev/null +++ b/node_modules/nomnom/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2010 Heather Arthur + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/nomnom/README.md b/node_modules/nomnom/README.md new file mode 100644 index 000000000..5864a0956 --- /dev/null +++ b/node_modules/nomnom/README.md @@ -0,0 +1,325 @@ +# nomnom +nomnom is an option parser for node. It noms your args and gives them back to you in a hash. + +```javascript +var opts = require("nomnom") + .option('debug', { + abbr: 'd', + flag: true, + help: 'Print debugging info' + }) + .option('config', { + abbr: 'c', + default: 'config.json', + help: 'JSON file with tests to run' + }) + .option('version', { + flag: true, + help: 'print version and exit', + callback: function() { + return "version 1.2.4"; + } + }) + .parse(); + +if (opts.debug) + // do stuff +``` + +You don't have to specify anything if you don't want to: + +```javascript +var opts = require("nomnom").parse(); + +var url = opts[0]; // get the first positional arg +var file = opts.file // see if --file was specified +var verbose = opts.v // see if -v was specified +var extras = opts._ // get an array of the unmatched, positional args +``` + +# Install +for [node.js](http://nodejs.org/) and [npm](http://github.com/isaacs/npm): + + npm install nomnom + +# More Details +Nomnom supports args like `-d`, `--debug`, `--no-debug`, `--file=test.txt`, `--file test.txt`, `-f test.txt`, `-xvf`, and positionals. Positionals are arguments that don't fit the `-a` or `--atomic` format and aren't attached to an option. + +Values are JSON parsed, so `--debug=true --count=3 --file=log.txt` would give you: + +``` +{ + "debug": true, + "count": 3, + "file": "log.txt" +} +``` + +# Commands +Nomnom supports command-based interfaces (e.g. with git: `git add -p` and `git rebase -i` where `add` and `rebase` are the commands): + +```javascript +var parser = require("nomnom"); + +parser.command('browser') + .callback(function(opts) { + runBrowser(opts.url); + }) + .help("run browser tests"); + +parser.command('sanity') + .option('outfile', { + abbr: 'o', + help: "file to write results to" + }) + .option('config', { + abbr: 'c', + default: 'config.json', + help: "json manifest of tests to run" + }) + .callback(function(opts) { + runSanity(opts.filename); + }) + .help("run the sanity tests") + +parser.parse(); +``` + +Each command generates its own usage message when `-h` or `--help` is specified with the command. + +# Usage +Nomnom prints out a usage message if `--help` or `-h` is an argument. Usage for these options in `test.js`: + +```javascript +var opts = require("nomnom") + .script("runtests") + .options({ + path: { + position: 0, + help: "Test file to run", + list: true + }, + config: { + abbr: 'c', + metavar: 'FILE', + help: "Config file with tests to run" + }, + debug: { + abbr: 'd', + flag: true, + help: "Print debugging info" + } + }).parse(); +``` + +...would look like this: + + usage: runtests ... [options] + + path Test file to run + + options: + -c FILE, --config FILE Config file with tests to run + -d, --debug Print debugging info + +# Options +You can either add a specification for an option with `nomnom.option('name', spec)` or pass the specifications to `nomnom.options()` as a hash keyed on option name. Each option specification can have the following fields: + +#### abbr and full +`abbr` is the single character string to match to this option, `full` is the full-length string (defaults to the name of the option). + +This option matches `-d` and `--debug` on the command line: + +```javascript +nomnom.option('debug', { + abbr: 'd' +}) +``` + +This option matches `-n 3`, `--num-lines 12` on the command line: + +```javascript +nomnom.option('numLines', { + abbr: 'n', + full: 'num-lines' +}) +``` + +#### flag + +If this is set to true, the option acts as a flag and doesn't swallow the next value on the command line. Default is `false`, so normally if you had a command line `--config test.js`, `config` would get a value of `test.js` in the options hash. Whereas if you specify: + +```javascript +nomnom.option('config', { + flag: true +}) +``` + +`config` would get a value of `true` in the options hash, and `test.js` would be a free positional arg. + +#### metavar + +`metavar` is used in the usage printout e.g. `"PATH"` in `"-f PATH, --file PATH"`. + +#### string + +A shorthand for `abbr`, `full`, and `metavar`. For example, to attach an option to `-c` and `--config` use a `string: "-c FILE, --config=FILE"` + +#### help + +A string description of the option for the usage printout. + +#### default + +The value to give the option if it's not specified in the arguments. + +#### type + +If you don't want the option JSON-parsed, specify type `"string"`. + +#### callback + +A callback that will be executed as soon as the option is encountered. If the callback returns a string it will print the string and exit: + +```javascript +nomnom.option('count', { + callback: function(count) { + if (count != parseInt(count)) { + return "count must be an integer"; + } + } +}) +``` + +#### position + +The position of the option if it's a positional argument. If the option should be matched to the first positional arg use position `0`, etc. + +#### list + +Specifies that the option is a list. Appending can be achieved by specifying the arg more than once on the command line: + + node test.js --file=test1.js --file=test2.js + +If the option has a `position` and `list` is `true`, all positional args including and after `position` will be appended to the array. + +#### required + +If this is set to `true` and the option isn't in the args, a message will be printed and the program will exit. + +#### choices + +A list of the possible values for the option (e.g. `['run', 'test', 'open']`). If the parsed value isn't in the list a message will be printed and the program will exit. + +#### transform + +A function that takes the value of the option as entered and returns a new value that will be seen as the value of the option. + +```javascript +nomnom.option('date', { + abbr: 'd', + transform: function(timestamp) { + return new Date(timestamp); + } +}) +``` + +#### hidden + +Option won't be printed in the usage + + +# Parser interface +`require("nomnom")` will give you the option parser. You can also make an instance of a parser with `require("nomnom")()`. You can chain any of these functions off of a parser: + +#### option + +Add an option specification with the given name: + +```javascript +nomnom.option('debug', { + abbr: 'd', + flag: true, + help: "Print debugging info" +}) +``` + +#### options + +Add options as a hash keyed by option name, good for a cli with tons of options like [this example](http://github.com/harthur/replace/blob/master/bin/replace.js): + +```javascript +nomnom.options({ + debug: { + abbr: 'd', + flag: true, + help: "Print debugging info" + }, + fruit: { + help: "Fruit to buy" + } +}) +``` + +#### usage + +The string that will override the default generated usage message. + +#### help + +A string that is appended to the usage. + +#### script + +Nomnom can't detect the alias used to run your script. You can use `script` to provide the correct name for the usage printout instead of e.g. `node test.js`. + +#### printer + +Overrides the usage printing function. + +#### command + +Takes a command name and gives you a command object on which you can chain command options. + +#### nocommand + +Gives a command object that will be used when no command is called. + +#### nocolors + +Disables coloring of the usage message. + +#### parse + +Parses node's `process.argv` and returns the parsed options hash. You can also provide argv: + +```javascript +var opts = nomnom.parse(["-xvf", "--atomic=true"]) +``` + +#### nom + +The same as `parse()`. + +# Command interface +A command is specified with `nomnom.command('name')`. All these functions can be chained on a command: + +#### option + +Add an option specifically for this command. + +#### options + +Add options for this command as a hash of options keyed by name. + +#### callback + +A callback that will be called with the parsed options when the command is used. + +#### help + +A help string describing the function of this command. + +#### usage + +Override the default generated usage string for this command. diff --git a/node_modules/nomnom/node_modules/.bin/strip-ansi b/node_modules/nomnom/node_modules/.bin/strip-ansi new file mode 120000 index 000000000..b65c9f81d --- /dev/null +++ b/node_modules/nomnom/node_modules/.bin/strip-ansi @@ -0,0 +1 @@ +../strip-ansi/cli.js \ No newline at end of file diff --git a/node_modules/nomnom/node_modules/ansi-styles/ansi-styles.js b/node_modules/nomnom/node_modules/ansi-styles/ansi-styles.js new file mode 100644 index 000000000..3da548c40 --- /dev/null +++ b/node_modules/nomnom/node_modules/ansi-styles/ansi-styles.js @@ -0,0 +1,38 @@ +'use strict'; +var styles = module.exports; + +var codes = { + reset: [0, 0], + + bold: [1, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + strikethrough: [9, 29], + + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + gray: [90, 39], + + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49] +}; + +Object.keys(codes).forEach(function (key) { + var val = codes[key]; + var style = styles[key] = {}; + style.open = '\x1b[' + val[0] + 'm'; + style.close = '\x1b[' + val[1] + 'm'; +}); diff --git a/node_modules/nomnom/node_modules/ansi-styles/package.json b/node_modules/nomnom/node_modules/ansi-styles/package.json new file mode 100644 index 000000000..99aa23f07 --- /dev/null +++ b/node_modules/nomnom/node_modules/ansi-styles/package.json @@ -0,0 +1,109 @@ +{ + "_args": [ + [ + { + "raw": "ansi-styles@~1.0.0", + "scope": null, + "escapedName": "ansi-styles", + "name": "ansi-styles", + "rawSpec": "~1.0.0", + "spec": ">=1.0.0 <1.1.0", + "type": "range" + }, + "/home/dold/repos/taler/wallet-webex/node_modules/nomnom/node_modules/chalk" + ] + ], + "_from": "ansi-styles@>=1.0.0 <1.1.0", + "_id": "ansi-styles@1.0.0", + "_inCache": true, + "_location": "/nomnom/ansi-styles", + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "1.3.15", + "_phantomChildren": {}, + "_requested": { + "raw": "ansi-styles@~1.0.0", + "scope": null, + "escapedName": "ansi-styles", + "name": "ansi-styles", + "rawSpec": "~1.0.0", + "spec": ">=1.0.0 <1.1.0", + "type": "range" + }, + "_requiredBy": [ + "/nomnom/chalk" + ], + "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.0.0.tgz", + "_shasum": "cb102df1c56f5123eab8b67cd7b98027a0279178", + "_shrinkwrap": null, + "_spec": "ansi-styles@~1.0.0", + "_where": "/home/dold/repos/taler/wallet-webex/node_modules/nomnom/node_modules/chalk", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/ansi-styles/issues" + }, + "dependencies": {}, + "description": "ANSI escape codes for colorizing strings in the terminal", + "devDependencies": { + "mocha": "~1.12.0" + }, + "directories": {}, + "dist": { + "shasum": "cb102df1c56f5123eab8b67cd7b98027a0279178", + "tarball": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.0.0.tgz" + }, + "engines": { + "node": ">=0.8.0" + }, + "files": [ + "ansi-styles.js" + ], + "homepage": "https://github.com/sindresorhus/ansi-styles", + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "license": "MIT", + "main": "ansi-styles", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "ansi-styles", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/sindresorhus/ansi-styles.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "1.0.0" +} diff --git a/node_modules/nomnom/node_modules/ansi-styles/readme.md b/node_modules/nomnom/node_modules/ansi-styles/readme.md new file mode 100644 index 000000000..4ac8cbd0a --- /dev/null +++ b/node_modules/nomnom/node_modules/ansi-styles/readme.md @@ -0,0 +1,65 @@ +# ansi-styles [![Build Status](https://secure.travis-ci.org/sindresorhus/ansi-styles.png?branch=master)](http://travis-ci.org/sindresorhus/ansi-styles) + +> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for colorizing strings in the terminal. + +You probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings. + +![screenshot](screenshot.png) + + +## Install + +Install with [npm](https://npmjs.org/package/ansi-styles): `npm install --save ansi-styles` + + +## Example + +```js +var ansi = require('ansi-styles'); + +console.log(ansi.green.open + 'Hello world!' + ansi.green.close); +``` + +## API + +Each style has an `open` and `close` property. + + +## Styles + +### General + +- reset +- bold +- italic +- underline +- inverse +- strikethrough + +### Text colors + +- black +- red +- green +- yellow +- blue +- magenta +- cyan +- white +- gray + +### Background colors + +- bgBlack +- bgRed +- bgGreen +- bgYellow +- bgBlue +- bgMagenta +- bgCyan +- bgWhite + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/nomnom/node_modules/chalk/index.js b/node_modules/nomnom/node_modules/chalk/index.js new file mode 100644 index 000000000..a21f70223 --- /dev/null +++ b/node_modules/nomnom/node_modules/chalk/index.js @@ -0,0 +1,63 @@ +'use strict'; +var ansi = require('ansi-styles'); +var stripAnsi = require('strip-ansi'); +var hasColor = require('has-color'); +var defineProps = Object.defineProperties; +var chalk = module.exports; + +var styles = (function () { + var ret = {}; + + ansi.grey = ansi.gray; + + Object.keys(ansi).forEach(function (key) { + ret[key] = { + get: function () { + this._styles.push(key); + return this; + } + }; + }); + + return ret; +})(); + +function init() { + var ret = {}; + + Object.keys(styles).forEach(function (name) { + ret[name] = { + get: function () { + var obj = defineProps(function self() { + var str = [].slice.call(arguments).join(' '); + + if (!chalk.enabled) { + return str; + } + + return self._styles.reduce(function (str, name) { + var code = ansi[name]; + return str ? code.open + str + code.close : ''; + }, str); + }, styles); + + obj._styles = []; + + return obj[name]; + } + } + }); + + return ret; +} + +defineProps(chalk, init()); + +chalk.styles = ansi; +chalk.stripColor = stripAnsi; +chalk.supportsColor = hasColor; + +// detect mode if not set manually +if (chalk.enabled === undefined) { + chalk.enabled = chalk.supportsColor; +} diff --git a/node_modules/nomnom/node_modules/chalk/package.json b/node_modules/nomnom/node_modules/chalk/package.json new file mode 100644 index 000000000..486da5c1b --- /dev/null +++ b/node_modules/nomnom/node_modules/chalk/package.json @@ -0,0 +1,111 @@ +{ + "_args": [ + [ + { + "raw": "chalk@~0.4.0", + "scope": null, + "escapedName": "chalk", + "name": "chalk", + "rawSpec": "~0.4.0", + "spec": ">=0.4.0 <0.5.0", + "type": "range" + }, + "/home/dold/repos/taler/wallet-webex/node_modules/nomnom" + ] + ], + "_from": "chalk@>=0.4.0 <0.5.0", + "_id": "chalk@0.4.0", + "_inCache": true, + "_location": "/nomnom/chalk", + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "1.3.17", + "_phantomChildren": {}, + "_requested": { + "raw": "chalk@~0.4.0", + "scope": null, + "escapedName": "chalk", + "name": "chalk", + "rawSpec": "~0.4.0", + "spec": ">=0.4.0 <0.5.0", + "type": "range" + }, + "_requiredBy": [ + "/nomnom" + ], + "_resolved": "https://registry.npmjs.org/chalk/-/chalk-0.4.0.tgz", + "_shasum": "5199a3ddcd0c1efe23bc08c1b027b06176e0c64f", + "_shrinkwrap": null, + "_spec": "chalk@~0.4.0", + "_where": "/home/dold/repos/taler/wallet-webex/node_modules/nomnom", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/chalk/issues" + }, + "dependencies": { + "ansi-styles": "~1.0.0", + "has-color": "~0.1.0", + "strip-ansi": "~0.1.0" + }, + "description": "Terminal string styling done right. Created because the `colors` module does some really horrible things.", + "devDependencies": { + "mocha": "~1.x" + }, + "directories": {}, + "dist": { + "shasum": "5199a3ddcd0c1efe23bc08c1b027b06176e0c64f", + "tarball": "https://registry.npmjs.org/chalk/-/chalk-0.4.0.tgz" + }, + "engines": { + "node": ">=0.8.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/chalk", + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "ansi", + "styles", + "tty", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "chalk", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/sindresorhus/chalk.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "0.4.0" +} diff --git a/node_modules/nomnom/node_modules/chalk/readme.md b/node_modules/nomnom/node_modules/chalk/readme.md new file mode 100644 index 000000000..46813acfc --- /dev/null +++ b/node_modules/nomnom/node_modules/chalk/readme.md @@ -0,0 +1,158 @@ +# chalk + +> Terminal string styling done right + +[![Build Status](https://secure.travis-ci.org/sindresorhus/chalk.png?branch=master)](http://travis-ci.org/sindresorhus/chalk) + +[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](https://github.com/yeoman/yo/issues/68). Although there are other ones, they either do too much or not enough. + +**Chalk is a clean and focused alternative.** + +![screenshot](screenshot.png) + + +## Why + +- **Doesn't extend String.prototype** +- Expressive API +- Clean and focused +- Auto-detects color support +- Actively maintained +- [Used by 150+ modules](https://npmjs.org/browse/depended/chalk) + + +## Install + +Install with [npm](https://npmjs.org/package/chalk): `npm install --save chalk` + + +## Example + +Chalk comes with an easy to use composable API where you just chain and nest the styles you want. + +```js +var chalk = require('chalk'); + +// style a string +console.log( chalk.blue('Hello world!') ); + +// combine styled and normal strings +console.log( chalk.blue('Hello'), 'World' + chalk.red('!') ); + +// compose multiple styles using the chainable API +console.log( chalk.blue.bgRed.bold('Hello world!') ); + +// nest styles +console.log( chalk.red('Hello', chalk.underline.bgBlue('world') + '!') ); + +// pass in multiple arguments +console.log( chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz') ); +``` + +You can easily define your own themes. + +```js +var chalk = require('chalk'); +var error = chalk.bold.red; +console.log(error('Error!')); +``` + + +## API + +### chalk.`