mirror of
https://github.com/kemko/liquid.git
synced 2026-01-08 19:25:40 +03:00
Set up Grunt
Fixing up Grunt file to watch for directories Exclude node modules folder from Jekyll built site
This commit is contained in:
21
node_modules/grunt-shell/license
generated
vendored
Normal file
21
node_modules/grunt-shell/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
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.
|
||||
100
node_modules/grunt-shell/node_modules/chalk/index.js
generated
vendored
Normal file
100
node_modules/grunt-shell/node_modules/chalk/index.js
generated
vendored
Normal file
@@ -0,0 +1,100 @@
|
||||
'use strict';
|
||||
var escapeStringRegexp = require('escape-string-regexp');
|
||||
var ansiStyles = require('ansi-styles');
|
||||
var stripAnsi = require('strip-ansi');
|
||||
var hasAnsi = require('has-ansi');
|
||||
var supportsColor = require('supports-color');
|
||||
var defineProps = Object.defineProperties;
|
||||
|
||||
function Chalk(options) {
|
||||
// detect mode if not set manually
|
||||
this.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled;
|
||||
}
|
||||
|
||||
// use bright blue on Windows as the normal blue color is illegible
|
||||
if (process.platform === 'win32') {
|
||||
ansiStyles.blue.open = '\u001b[94m';
|
||||
}
|
||||
|
||||
function build(_styles) {
|
||||
var builder = function builder() {
|
||||
return applyStyle.apply(builder, arguments);
|
||||
};
|
||||
builder._styles = _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.
|
||||
builder.__proto__ = proto;
|
||||
return builder;
|
||||
}
|
||||
|
||||
var styles = (function () {
|
||||
var ret = {};
|
||||
|
||||
Object.keys(ansiStyles).forEach(function (key) {
|
||||
ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
|
||||
|
||||
ret[key] = {
|
||||
get: function () {
|
||||
return build.call(this, this._styles.concat(key));
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
return ret;
|
||||
})();
|
||||
|
||||
var proto = defineProps(function chalk() {}, styles);
|
||||
|
||||
function applyStyle() {
|
||||
// support varags, but simply cast to string in case there's only one arg
|
||||
var args = arguments;
|
||||
var argsLen = args.length;
|
||||
var str = argsLen !== 0 && String(arguments[0]);
|
||||
if (argsLen > 1) {
|
||||
// don't slice `arguments`, it prevents v8 optimizations
|
||||
for (var a = 1; a < argsLen; a++) {
|
||||
str += ' ' + args[a];
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.enabled || !str) {
|
||||
return str;
|
||||
}
|
||||
|
||||
/*jshint validthis: true */
|
||||
var nestedStyles = this._styles;
|
||||
|
||||
var i = nestedStyles.length;
|
||||
while (i--) {
|
||||
var code = ansiStyles[nestedStyles[i]];
|
||||
// Replace any instances already present with a re-opening code
|
||||
// otherwise only the part of the string until said closing code
|
||||
// will be colored, and the rest will simply be 'plain'.
|
||||
str = code.open + str.replace(code.closeRe, code.open) + code.close;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
function init() {
|
||||
var ret = {};
|
||||
|
||||
Object.keys(styles).forEach(function (name) {
|
||||
ret[name] = {
|
||||
get: function () {
|
||||
return build.call(this, [name]);
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
defineProps(Chalk.prototype, init());
|
||||
|
||||
module.exports = new Chalk();
|
||||
module.exports.styles = ansiStyles;
|
||||
module.exports.hasColor = hasAnsi;
|
||||
module.exports.stripColor = stripAnsi;
|
||||
module.exports.supportsColor = supportsColor;
|
||||
21
node_modules/grunt-shell/node_modules/chalk/license
generated
vendored
Normal file
21
node_modules/grunt-shell/node_modules/chalk/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
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.
|
||||
1
node_modules/grunt-shell/node_modules/chalk/node_modules/.bin/has-ansi
generated
vendored
Symbolic link
1
node_modules/grunt-shell/node_modules/chalk/node_modules/.bin/has-ansi
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../has-ansi/cli.js
|
||||
1
node_modules/grunt-shell/node_modules/chalk/node_modules/.bin/strip-ansi
generated
vendored
Symbolic link
1
node_modules/grunt-shell/node_modules/chalk/node_modules/.bin/strip-ansi
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../strip-ansi/cli.js
|
||||
1
node_modules/grunt-shell/node_modules/chalk/node_modules/.bin/supports-color
generated
vendored
Symbolic link
1
node_modules/grunt-shell/node_modules/chalk/node_modules/.bin/supports-color
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../supports-color/cli.js
|
||||
56
node_modules/grunt-shell/node_modules/chalk/node_modules/ansi-styles/index.js
generated
vendored
Normal file
56
node_modules/grunt-shell/node_modules/chalk/node_modules/ansi-styles/index.js
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
'use strict';
|
||||
|
||||
var styles = module.exports = {
|
||||
modifiers: {
|
||||
reset: [0, 0],
|
||||
bold: [1, 22], // 21 isn't widely supported and 22 does the same thing
|
||||
dim: [2, 22],
|
||||
italic: [3, 23],
|
||||
underline: [4, 24],
|
||||
inverse: [7, 27],
|
||||
hidden: [8, 28],
|
||||
strikethrough: [9, 29]
|
||||
},
|
||||
colors: {
|
||||
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]
|
||||
},
|
||||
bgColors: {
|
||||
bgBlack: [40, 49],
|
||||
bgRed: [41, 49],
|
||||
bgGreen: [42, 49],
|
||||
bgYellow: [43, 49],
|
||||
bgBlue: [44, 49],
|
||||
bgMagenta: [45, 49],
|
||||
bgCyan: [46, 49],
|
||||
bgWhite: [47, 49]
|
||||
}
|
||||
};
|
||||
|
||||
// fix humans
|
||||
styles.colors.grey = styles.colors.gray;
|
||||
|
||||
Object.keys(styles).forEach(function (groupName) {
|
||||
var group = styles[groupName];
|
||||
|
||||
Object.keys(group).forEach(function (styleName) {
|
||||
var style = group[styleName];
|
||||
|
||||
styles[styleName] = group[styleName] = {
|
||||
open: '\u001b[' + style[0] + 'm',
|
||||
close: '\u001b[' + style[1] + 'm'
|
||||
};
|
||||
});
|
||||
|
||||
Object.defineProperty(styles, groupName, {
|
||||
value: group,
|
||||
enumerable: false
|
||||
});
|
||||
});
|
||||
21
node_modules/grunt-shell/node_modules/chalk/node_modules/ansi-styles/license
generated
vendored
Normal file
21
node_modules/grunt-shell/node_modules/chalk/node_modules/ansi-styles/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
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.
|
||||
79
node_modules/grunt-shell/node_modules/chalk/node_modules/ansi-styles/package.json
generated
vendored
Normal file
79
node_modules/grunt-shell/node_modules/chalk/node_modules/ansi-styles/package.json
generated
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
{
|
||||
"name": "ansi-styles",
|
||||
"version": "2.0.1",
|
||||
"description": "ANSI escape codes for styling strings in the terminal",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sindresorhus/ansi-styles"
|
||||
},
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "http://sindresorhus.com"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "jbnicolai",
|
||||
"email": "jappelman@xebia.com"
|
||||
}
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"keywords": [
|
||||
"ansi",
|
||||
"styles",
|
||||
"color",
|
||||
"colour",
|
||||
"colors",
|
||||
"terminal",
|
||||
"console",
|
||||
"cli",
|
||||
"string",
|
||||
"tty",
|
||||
"escape",
|
||||
"formatting",
|
||||
"rgb",
|
||||
"256",
|
||||
"shell",
|
||||
"xterm",
|
||||
"log",
|
||||
"logging",
|
||||
"command-line",
|
||||
"text"
|
||||
],
|
||||
"devDependencies": {
|
||||
"mocha": "*"
|
||||
},
|
||||
"gitHead": "da6541334e1681cb803f891fab8abf4313cc4bc1",
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/ansi-styles/issues"
|
||||
},
|
||||
"homepage": "https://github.com/sindresorhus/ansi-styles",
|
||||
"_id": "ansi-styles@2.0.1",
|
||||
"_shasum": "b033f57f93e2d28adeb8bc11138fa13da0fd20a3",
|
||||
"_from": "ansi-styles@^2.0.1",
|
||||
"_npmVersion": "2.1.16",
|
||||
"_nodeVersion": "0.10.35",
|
||||
"_npmUser": {
|
||||
"name": "jbnicolai",
|
||||
"email": "jappelman@xebia.com"
|
||||
},
|
||||
"dist": {
|
||||
"shasum": "b033f57f93e2d28adeb8bc11138fa13da0fd20a3",
|
||||
"tarball": "http://registry.npmjs.org/ansi-styles/-/ansi-styles-2.0.1.tgz"
|
||||
},
|
||||
"directories": {},
|
||||
"_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.0.1.tgz"
|
||||
}
|
||||
86
node_modules/grunt-shell/node_modules/chalk/node_modules/ansi-styles/readme.md
generated
vendored
Normal file
86
node_modules/grunt-shell/node_modules/chalk/node_modules/ansi-styles/readme.md
generated
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
# ansi-styles [](https://travis-ci.org/sindresorhus/ansi-styles)
|
||||
|
||||
> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal
|
||||
|
||||
You probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings.
|
||||
|
||||

|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
$ npm install --save ansi-styles
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```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
|
||||
|
||||
### Modifiers
|
||||
|
||||
- `reset`
|
||||
- `bold`
|
||||
- `dim`
|
||||
- `italic` *(not widely supported)*
|
||||
- `underline`
|
||||
- `inverse`
|
||||
- `hidden`
|
||||
- `strikethrough` *(not widely supported)*
|
||||
|
||||
### Colors
|
||||
|
||||
- `black`
|
||||
- `red`
|
||||
- `green`
|
||||
- `yellow`
|
||||
- `blue`
|
||||
- `magenta`
|
||||
- `cyan`
|
||||
- `white`
|
||||
- `gray`
|
||||
|
||||
### Background colors
|
||||
|
||||
- `bgBlack`
|
||||
- `bgRed`
|
||||
- `bgGreen`
|
||||
- `bgYellow`
|
||||
- `bgBlue`
|
||||
- `bgMagenta`
|
||||
- `bgCyan`
|
||||
- `bgWhite`
|
||||
|
||||
|
||||
## Advanced usage
|
||||
|
||||
By default you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module.
|
||||
|
||||
- `ansi.modifiers`
|
||||
- `ansi.colors`
|
||||
- `ansi.bgColors`
|
||||
|
||||
|
||||
###### Example
|
||||
|
||||
```js
|
||||
console.log(ansi.colors.green.open);
|
||||
```
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
11
node_modules/grunt-shell/node_modules/chalk/node_modules/escape-string-regexp/index.js
generated
vendored
Normal file
11
node_modules/grunt-shell/node_modules/chalk/node_modules/escape-string-regexp/index.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
'use strict';
|
||||
|
||||
var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
|
||||
|
||||
module.exports = function (str) {
|
||||
if (typeof str !== 'string') {
|
||||
throw new TypeError('Expected a string');
|
||||
}
|
||||
|
||||
return str.replace(matchOperatorsRe, '\\$&');
|
||||
};
|
||||
21
node_modules/grunt-shell/node_modules/chalk/node_modules/escape-string-regexp/license
generated
vendored
Normal file
21
node_modules/grunt-shell/node_modules/chalk/node_modules/escape-string-regexp/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
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.
|
||||
70
node_modules/grunt-shell/node_modules/chalk/node_modules/escape-string-regexp/package.json
generated
vendored
Normal file
70
node_modules/grunt-shell/node_modules/chalk/node_modules/escape-string-regexp/package.json
generated
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
{
|
||||
"name": "escape-string-regexp",
|
||||
"version": "1.0.3",
|
||||
"description": "Escape RegExp special characters",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sindresorhus/escape-string-regexp"
|
||||
},
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "http://sindresorhus.com"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "jbnicolai",
|
||||
"email": "jappelman@xebia.com"
|
||||
}
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=0.8.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"keywords": [
|
||||
"regex",
|
||||
"regexp",
|
||||
"re",
|
||||
"regular",
|
||||
"expression",
|
||||
"escape",
|
||||
"string",
|
||||
"str",
|
||||
"special",
|
||||
"characters"
|
||||
],
|
||||
"devDependencies": {
|
||||
"mocha": "*"
|
||||
},
|
||||
"gitHead": "1e446e6b4449b5f1f8868cd31bf8fd25ee37fb4b",
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/escape-string-regexp/issues"
|
||||
},
|
||||
"homepage": "https://github.com/sindresorhus/escape-string-regexp",
|
||||
"_id": "escape-string-regexp@1.0.3",
|
||||
"_shasum": "9e2d8b25bc2555c3336723750e03f099c2735bb5",
|
||||
"_from": "escape-string-regexp@^1.0.2",
|
||||
"_npmVersion": "2.1.16",
|
||||
"_nodeVersion": "0.10.35",
|
||||
"_npmUser": {
|
||||
"name": "jbnicolai",
|
||||
"email": "jappelman@xebia.com"
|
||||
},
|
||||
"dist": {
|
||||
"shasum": "9e2d8b25bc2555c3336723750e03f099c2735bb5",
|
||||
"tarball": "http://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.3.tgz"
|
||||
},
|
||||
"directories": {},
|
||||
"_resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.3.tgz",
|
||||
"readme": "ERROR: No README data found!"
|
||||
}
|
||||
27
node_modules/grunt-shell/node_modules/chalk/node_modules/escape-string-regexp/readme.md
generated
vendored
Normal file
27
node_modules/grunt-shell/node_modules/chalk/node_modules/escape-string-regexp/readme.md
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
# escape-string-regexp [](https://travis-ci.org/sindresorhus/escape-string-regexp)
|
||||
|
||||
> Escape RegExp special characters
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
$ npm install --save escape-string-regexp
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var escapeStringRegexp = require('escape-string-regexp');
|
||||
|
||||
var escapedString = escapeStringRegexp('how much $ for a unicorn?');
|
||||
//=> how much \$ for a unicorn\?
|
||||
|
||||
new RegExp(escapedString);
|
||||
```
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
45
node_modules/grunt-shell/node_modules/chalk/node_modules/has-ansi/cli.js
generated
vendored
Executable file
45
node_modules/grunt-shell/node_modules/chalk/node_modules/has-ansi/cli.js
generated
vendored
Executable file
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env node
|
||||
'use strict';
|
||||
var stdin = require('get-stdin');
|
||||
var pkg = require('./package.json');
|
||||
var hasAnsi = require('./');
|
||||
var argv = process.argv.slice(2);
|
||||
var input = argv[0];
|
||||
|
||||
function help() {
|
||||
console.log([
|
||||
'',
|
||||
' ' + pkg.description,
|
||||
'',
|
||||
' Usage',
|
||||
' has-ansi <string>',
|
||||
' echo <string> | has-ansi',
|
||||
'',
|
||||
' Exits with code 0 if input has ANSI escape codes and 1 if not'
|
||||
].join('\n'));
|
||||
}
|
||||
|
||||
function init(data) {
|
||||
process.exit(hasAnsi(data) ? 0 : 1);
|
||||
}
|
||||
|
||||
if (argv.indexOf('--help') !== -1) {
|
||||
help();
|
||||
return;
|
||||
}
|
||||
|
||||
if (argv.indexOf('--version') !== -1) {
|
||||
console.log(pkg.version);
|
||||
return;
|
||||
}
|
||||
|
||||
if (process.stdin.isTTY) {
|
||||
if (!input) {
|
||||
help();
|
||||
return;
|
||||
}
|
||||
|
||||
init(input);
|
||||
} else {
|
||||
stdin(init);
|
||||
}
|
||||
4
node_modules/grunt-shell/node_modules/chalk/node_modules/has-ansi/index.js
generated
vendored
Normal file
4
node_modules/grunt-shell/node_modules/chalk/node_modules/has-ansi/index.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
'use strict';
|
||||
var ansiRegex = require('ansi-regex');
|
||||
var re = new RegExp(ansiRegex().source); // remove the `g` flag
|
||||
module.exports = re.test.bind(re);
|
||||
21
node_modules/grunt-shell/node_modules/chalk/node_modules/has-ansi/license
generated
vendored
Normal file
21
node_modules/grunt-shell/node_modules/chalk/node_modules/has-ansi/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
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.
|
||||
4
node_modules/grunt-shell/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/index.js
generated
vendored
Normal file
4
node_modules/grunt-shell/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/index.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = function () {
|
||||
return /(?:(?:\u001b\[)|\u009b)(?:(?:[0-9]{1,3})?(?:(?:;[0-9]{0,3})*)?[A-M|f-m])|\u001b[A-M]/g;
|
||||
};
|
||||
21
node_modules/grunt-shell/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/license
generated
vendored
Normal file
21
node_modules/grunt-shell/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
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.
|
||||
85
node_modules/grunt-shell/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/package.json
generated
vendored
Normal file
85
node_modules/grunt-shell/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/package.json
generated
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
{
|
||||
"name": "ansi-regex",
|
||||
"version": "1.1.1",
|
||||
"description": "Regular expression for matching ANSI escape codes",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sindresorhus/ansi-regex"
|
||||
},
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "http://sindresorhus.com"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "jbnicolai",
|
||||
"email": "jappelman@xebia.com"
|
||||
}
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha test/test.js",
|
||||
"view-supported": "node test/viewCodes.js"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"keywords": [
|
||||
"ansi",
|
||||
"styles",
|
||||
"color",
|
||||
"colour",
|
||||
"colors",
|
||||
"terminal",
|
||||
"console",
|
||||
"cli",
|
||||
"string",
|
||||
"tty",
|
||||
"escape",
|
||||
"formatting",
|
||||
"rgb",
|
||||
"256",
|
||||
"shell",
|
||||
"xterm",
|
||||
"command-line",
|
||||
"text",
|
||||
"regex",
|
||||
"regexp",
|
||||
"re",
|
||||
"match",
|
||||
"test",
|
||||
"find",
|
||||
"pattern"
|
||||
],
|
||||
"devDependencies": {
|
||||
"mocha": "*"
|
||||
},
|
||||
"gitHead": "47fb974630af70998157b30fad6eb5e5bd7c7cd6",
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/ansi-regex/issues"
|
||||
},
|
||||
"homepage": "https://github.com/sindresorhus/ansi-regex",
|
||||
"_id": "ansi-regex@1.1.1",
|
||||
"_shasum": "41c847194646375e6a1a5d10c3ca054ef9fc980d",
|
||||
"_from": "ansi-regex@^1.1.0",
|
||||
"_npmVersion": "2.1.16",
|
||||
"_nodeVersion": "0.10.35",
|
||||
"_npmUser": {
|
||||
"name": "jbnicolai",
|
||||
"email": "jappelman@xebia.com"
|
||||
},
|
||||
"dist": {
|
||||
"shasum": "41c847194646375e6a1a5d10c3ca054ef9fc980d",
|
||||
"tarball": "http://registry.npmjs.org/ansi-regex/-/ansi-regex-1.1.1.tgz"
|
||||
},
|
||||
"directories": {},
|
||||
"_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-1.1.1.tgz"
|
||||
}
|
||||
33
node_modules/grunt-shell/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/readme.md
generated
vendored
Normal file
33
node_modules/grunt-shell/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/readme.md
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
# ansi-regex [](https://travis-ci.org/sindresorhus/ansi-regex)
|
||||
|
||||
> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
$ npm install --save ansi-regex
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var ansiRegex = require('ansi-regex');
|
||||
|
||||
ansiRegex().test('\u001b[4mcake\u001b[0m');
|
||||
//=> true
|
||||
|
||||
ansiRegex().test('cake');
|
||||
//=> false
|
||||
|
||||
'\u001b[4mcake\u001b[0m'.match(ansiRegex());
|
||||
//=> ['\u001b[4m', '\u001b[0m']
|
||||
```
|
||||
|
||||
*It's a function so you can create multiple instances. Regexes with the global flag will have the `.lastIndex` property changed for each call to methods on the instance. Therefore reusing the instance with multiple calls will not work as expected for `.test()`.*
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
49
node_modules/grunt-shell/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/index.js
generated
vendored
Normal file
49
node_modules/grunt-shell/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/index.js
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = function (cb) {
|
||||
var stdin = process.stdin;
|
||||
var ret = '';
|
||||
|
||||
if (stdin.isTTY) {
|
||||
setImmediate(cb, '');
|
||||
return;
|
||||
}
|
||||
|
||||
stdin.setEncoding('utf8');
|
||||
|
||||
stdin.on('readable', function () {
|
||||
var chunk;
|
||||
|
||||
while (chunk = stdin.read()) {
|
||||
ret += chunk;
|
||||
}
|
||||
});
|
||||
|
||||
stdin.on('end', function () {
|
||||
cb(ret);
|
||||
});
|
||||
};
|
||||
|
||||
module.exports.buffer = function (cb) {
|
||||
var stdin = process.stdin;
|
||||
var ret = [];
|
||||
var len = 0;
|
||||
|
||||
if (stdin.isTTY) {
|
||||
setImmediate(cb, new Buffer(''));
|
||||
return;
|
||||
}
|
||||
|
||||
stdin.on('readable', function () {
|
||||
var chunk;
|
||||
|
||||
while (chunk = stdin.read()) {
|
||||
ret.push(chunk);
|
||||
len += chunk.length;
|
||||
}
|
||||
});
|
||||
|
||||
stdin.on('end', function () {
|
||||
cb(Buffer.concat(ret, len));
|
||||
});
|
||||
};
|
||||
63
node_modules/grunt-shell/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/package.json
generated
vendored
Normal file
63
node_modules/grunt-shell/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/package.json
generated
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
{
|
||||
"name": "get-stdin",
|
||||
"version": "4.0.1",
|
||||
"description": "Easier stdin",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sindresorhus/get-stdin"
|
||||
},
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "http://sindresorhus.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node test.js && node test-buffer.js && echo unicorns | node test-real.js"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"keywords": [
|
||||
"std",
|
||||
"stdin",
|
||||
"stdio",
|
||||
"concat",
|
||||
"buffer",
|
||||
"stream",
|
||||
"process",
|
||||
"stream"
|
||||
],
|
||||
"devDependencies": {
|
||||
"ava": "0.0.4",
|
||||
"buffer-equal": "0.0.1"
|
||||
},
|
||||
"gitHead": "65c744975229b25d6cc5c7546f49b6ad9099553f",
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/get-stdin/issues"
|
||||
},
|
||||
"homepage": "https://github.com/sindresorhus/get-stdin",
|
||||
"_id": "get-stdin@4.0.1",
|
||||
"_shasum": "b968c6b0a04384324902e8bf1a5df32579a450fe",
|
||||
"_from": "get-stdin@^4.0.1",
|
||||
"_npmVersion": "1.4.28",
|
||||
"_npmUser": {
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
}
|
||||
],
|
||||
"dist": {
|
||||
"shasum": "b968c6b0a04384324902e8bf1a5df32579a450fe",
|
||||
"tarball": "http://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz"
|
||||
},
|
||||
"directories": {},
|
||||
"_resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz"
|
||||
}
|
||||
44
node_modules/grunt-shell/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/readme.md
generated
vendored
Normal file
44
node_modules/grunt-shell/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin/readme.md
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
# get-stdin [](https://travis-ci.org/sindresorhus/get-stdin)
|
||||
|
||||
> Easier stdin
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
$ npm install --save get-stdin
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
// example.js
|
||||
var stdin = require('get-stdin');
|
||||
|
||||
stdin(function (data) {
|
||||
console.log(data);
|
||||
//=> unicorns
|
||||
});
|
||||
```
|
||||
|
||||
```sh
|
||||
$ echo unicorns | node example.js
|
||||
unicorns
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### stdin(callback)
|
||||
|
||||
Get `stdin` as a string.
|
||||
|
||||
### stdin.buffer(callback)
|
||||
|
||||
Get `stdin` as a buffer.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
91
node_modules/grunt-shell/node_modules/chalk/node_modules/has-ansi/package.json
generated
vendored
Normal file
91
node_modules/grunt-shell/node_modules/chalk/node_modules/has-ansi/package.json
generated
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
{
|
||||
"name": "has-ansi",
|
||||
"version": "1.0.3",
|
||||
"description": "Check if a string has ANSI escape codes",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sindresorhus/has-ansi"
|
||||
},
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "http://sindresorhus.com"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "jbnicolai",
|
||||
"email": "jappelman@xebia.com"
|
||||
}
|
||||
],
|
||||
"bin": {
|
||||
"has-ansi": "cli.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"cli.js"
|
||||
],
|
||||
"keywords": [
|
||||
"cli",
|
||||
"bin",
|
||||
"ansi",
|
||||
"styles",
|
||||
"color",
|
||||
"colour",
|
||||
"colors",
|
||||
"terminal",
|
||||
"console",
|
||||
"string",
|
||||
"tty",
|
||||
"escape",
|
||||
"shell",
|
||||
"xterm",
|
||||
"command-line",
|
||||
"text",
|
||||
"regex",
|
||||
"regexp",
|
||||
"re",
|
||||
"match",
|
||||
"test",
|
||||
"find",
|
||||
"pattern",
|
||||
"has"
|
||||
],
|
||||
"dependencies": {
|
||||
"ansi-regex": "^1.1.0",
|
||||
"get-stdin": "^4.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mocha": "*"
|
||||
},
|
||||
"gitHead": "416428ed16f8e9718aec54cea083173af6019917",
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/has-ansi/issues"
|
||||
},
|
||||
"homepage": "https://github.com/sindresorhus/has-ansi",
|
||||
"_id": "has-ansi@1.0.3",
|
||||
"_shasum": "c0b5b1615d9e382b0ff67169d967b425e48ca538",
|
||||
"_from": "has-ansi@^1.0.3",
|
||||
"_npmVersion": "2.1.16",
|
||||
"_nodeVersion": "0.10.35",
|
||||
"_npmUser": {
|
||||
"name": "jbnicolai",
|
||||
"email": "jappelman@xebia.com"
|
||||
},
|
||||
"dist": {
|
||||
"shasum": "c0b5b1615d9e382b0ff67169d967b425e48ca538",
|
||||
"tarball": "http://registry.npmjs.org/has-ansi/-/has-ansi-1.0.3.tgz"
|
||||
},
|
||||
"directories": {},
|
||||
"_resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-1.0.3.tgz"
|
||||
}
|
||||
45
node_modules/grunt-shell/node_modules/chalk/node_modules/has-ansi/readme.md
generated
vendored
Normal file
45
node_modules/grunt-shell/node_modules/chalk/node_modules/has-ansi/readme.md
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
# has-ansi [](https://travis-ci.org/sindresorhus/has-ansi)
|
||||
|
||||
> Check if a string has [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
$ npm install --save has-ansi
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var hasAnsi = require('has-ansi');
|
||||
|
||||
hasAnsi('\u001b[4mcake\u001b[0m');
|
||||
//=> true
|
||||
|
||||
hasAnsi('cake');
|
||||
//=> false
|
||||
```
|
||||
|
||||
|
||||
## CLI
|
||||
|
||||
```sh
|
||||
$ npm install --global has-ansi
|
||||
```
|
||||
|
||||
```
|
||||
$ has-ansi --help
|
||||
|
||||
Usage
|
||||
has-ansi <string>
|
||||
echo <string> | has-ansi
|
||||
|
||||
Exits with code 0 if input has ANSI escape codes and 1 if not
|
||||
```
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
47
node_modules/grunt-shell/node_modules/chalk/node_modules/strip-ansi/cli.js
generated
vendored
Executable file
47
node_modules/grunt-shell/node_modules/chalk/node_modules/strip-ansi/cli.js
generated
vendored
Executable file
@@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env node
|
||||
'use strict';
|
||||
var fs = require('fs');
|
||||
var pkg = require('./package.json');
|
||||
var stripAnsi = require('./');
|
||||
var argv = process.argv.slice(2);
|
||||
var input = argv[0];
|
||||
|
||||
function help() {
|
||||
console.log([
|
||||
'',
|
||||
' ' + pkg.description,
|
||||
'',
|
||||
' Usage',
|
||||
' strip-ansi <input-file> > <output-file>',
|
||||
' cat <input-file> | strip-ansi > <output-file>',
|
||||
'',
|
||||
' Example',
|
||||
' strip-ansi unicorn.txt > unicorn-stripped.txt'
|
||||
].join('\n'));
|
||||
}
|
||||
|
||||
function init(data) {
|
||||
process.stdout.write(stripAnsi(data));
|
||||
}
|
||||
|
||||
if (argv.indexOf('--help') !== -1) {
|
||||
help();
|
||||
return;
|
||||
}
|
||||
|
||||
if (argv.indexOf('--version') !== -1) {
|
||||
console.log(pkg.version);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!input && process.stdin.isTTY) {
|
||||
help();
|
||||
return;
|
||||
}
|
||||
|
||||
if (input) {
|
||||
init(fs.readFileSync(input, 'utf8'));
|
||||
} else {
|
||||
process.stdin.setEncoding('utf8');
|
||||
process.stdin.on('data', init);
|
||||
}
|
||||
6
node_modules/grunt-shell/node_modules/chalk/node_modules/strip-ansi/index.js
generated
vendored
Normal file
6
node_modules/grunt-shell/node_modules/chalk/node_modules/strip-ansi/index.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
'use strict';
|
||||
var ansiRegex = require('ansi-regex')();
|
||||
|
||||
module.exports = function (str) {
|
||||
return typeof str === 'string' ? str.replace(ansiRegex, '') : str;
|
||||
};
|
||||
4
node_modules/grunt-shell/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/index.js
generated
vendored
Normal file
4
node_modules/grunt-shell/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/index.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = function () {
|
||||
return /(?:(?:\u001b\[)|\u009b)(?:(?:[0-9]{1,3})?(?:(?:;[0-9]{0,3})*)?[A-M|f-m])|\u001b[A-M]/g;
|
||||
};
|
||||
21
node_modules/grunt-shell/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/license
generated
vendored
Normal file
21
node_modules/grunt-shell/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
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.
|
||||
85
node_modules/grunt-shell/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/package.json
generated
vendored
Normal file
85
node_modules/grunt-shell/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/package.json
generated
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
{
|
||||
"name": "ansi-regex",
|
||||
"version": "1.1.1",
|
||||
"description": "Regular expression for matching ANSI escape codes",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sindresorhus/ansi-regex"
|
||||
},
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "http://sindresorhus.com"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "jbnicolai",
|
||||
"email": "jappelman@xebia.com"
|
||||
}
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha test/test.js",
|
||||
"view-supported": "node test/viewCodes.js"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"keywords": [
|
||||
"ansi",
|
||||
"styles",
|
||||
"color",
|
||||
"colour",
|
||||
"colors",
|
||||
"terminal",
|
||||
"console",
|
||||
"cli",
|
||||
"string",
|
||||
"tty",
|
||||
"escape",
|
||||
"formatting",
|
||||
"rgb",
|
||||
"256",
|
||||
"shell",
|
||||
"xterm",
|
||||
"command-line",
|
||||
"text",
|
||||
"regex",
|
||||
"regexp",
|
||||
"re",
|
||||
"match",
|
||||
"test",
|
||||
"find",
|
||||
"pattern"
|
||||
],
|
||||
"devDependencies": {
|
||||
"mocha": "*"
|
||||
},
|
||||
"gitHead": "47fb974630af70998157b30fad6eb5e5bd7c7cd6",
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/ansi-regex/issues"
|
||||
},
|
||||
"homepage": "https://github.com/sindresorhus/ansi-regex",
|
||||
"_id": "ansi-regex@1.1.1",
|
||||
"_shasum": "41c847194646375e6a1a5d10c3ca054ef9fc980d",
|
||||
"_from": "ansi-regex@^1.1.0",
|
||||
"_npmVersion": "2.1.16",
|
||||
"_nodeVersion": "0.10.35",
|
||||
"_npmUser": {
|
||||
"name": "jbnicolai",
|
||||
"email": "jappelman@xebia.com"
|
||||
},
|
||||
"dist": {
|
||||
"shasum": "41c847194646375e6a1a5d10c3ca054ef9fc980d",
|
||||
"tarball": "http://registry.npmjs.org/ansi-regex/-/ansi-regex-1.1.1.tgz"
|
||||
},
|
||||
"directories": {},
|
||||
"_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-1.1.1.tgz"
|
||||
}
|
||||
33
node_modules/grunt-shell/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/readme.md
generated
vendored
Normal file
33
node_modules/grunt-shell/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/readme.md
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
# ansi-regex [](https://travis-ci.org/sindresorhus/ansi-regex)
|
||||
|
||||
> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
$ npm install --save ansi-regex
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var ansiRegex = require('ansi-regex');
|
||||
|
||||
ansiRegex().test('\u001b[4mcake\u001b[0m');
|
||||
//=> true
|
||||
|
||||
ansiRegex().test('cake');
|
||||
//=> false
|
||||
|
||||
'\u001b[4mcake\u001b[0m'.match(ansiRegex());
|
||||
//=> ['\u001b[4m', '\u001b[0m']
|
||||
```
|
||||
|
||||
*It's a function so you can create multiple instances. Regexes with the global flag will have the `.lastIndex` property changed for each call to methods on the instance. Therefore reusing the instance with multiple calls will not work as expected for `.test()`.*
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
88
node_modules/grunt-shell/node_modules/chalk/node_modules/strip-ansi/package.json
generated
vendored
Normal file
88
node_modules/grunt-shell/node_modules/chalk/node_modules/strip-ansi/package.json
generated
vendored
Normal file
@@ -0,0 +1,88 @@
|
||||
{
|
||||
"name": "strip-ansi",
|
||||
"version": "2.0.1",
|
||||
"description": "Strip ANSI escape codes",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sindresorhus/strip-ansi"
|
||||
},
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "http://sindresorhus.com"
|
||||
},
|
||||
"bin": {
|
||||
"strip-ansi": "cli.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"cli.js"
|
||||
],
|
||||
"keywords": [
|
||||
"strip",
|
||||
"trim",
|
||||
"remove",
|
||||
"ansi",
|
||||
"styles",
|
||||
"color",
|
||||
"colour",
|
||||
"colors",
|
||||
"terminal",
|
||||
"console",
|
||||
"cli",
|
||||
"string",
|
||||
"tty",
|
||||
"escape",
|
||||
"formatting",
|
||||
"rgb",
|
||||
"256",
|
||||
"shell",
|
||||
"xterm",
|
||||
"log",
|
||||
"logging",
|
||||
"command-line",
|
||||
"text"
|
||||
],
|
||||
"dependencies": {
|
||||
"ansi-regex": "^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mocha": "*"
|
||||
},
|
||||
"gitHead": "1eff0936c01f89efa312d9d51deed137259871a1",
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/strip-ansi/issues"
|
||||
},
|
||||
"homepage": "https://github.com/sindresorhus/strip-ansi",
|
||||
"_id": "strip-ansi@2.0.1",
|
||||
"_shasum": "df62c1aa94ed2f114e1d0f21fd1d50482b79a60e",
|
||||
"_from": "strip-ansi@^2.0.1",
|
||||
"_npmVersion": "1.4.28",
|
||||
"_npmUser": {
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "jbnicolai",
|
||||
"email": "jappelman@xebia.com"
|
||||
}
|
||||
],
|
||||
"dist": {
|
||||
"shasum": "df62c1aa94ed2f114e1d0f21fd1d50482b79a60e",
|
||||
"tarball": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-2.0.1.tgz"
|
||||
},
|
||||
"directories": {},
|
||||
"_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-2.0.1.tgz"
|
||||
}
|
||||
43
node_modules/grunt-shell/node_modules/chalk/node_modules/strip-ansi/readme.md
generated
vendored
Normal file
43
node_modules/grunt-shell/node_modules/chalk/node_modules/strip-ansi/readme.md
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
# strip-ansi [](https://travis-ci.org/sindresorhus/strip-ansi)
|
||||
|
||||
> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
$ npm install --save strip-ansi
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var stripAnsi = require('strip-ansi');
|
||||
|
||||
stripAnsi('\u001b[4mcake\u001b[0m');
|
||||
//=> 'cake'
|
||||
```
|
||||
|
||||
|
||||
## CLI
|
||||
|
||||
```sh
|
||||
$ npm install --global strip-ansi
|
||||
```
|
||||
|
||||
```sh
|
||||
$ strip-ansi --help
|
||||
|
||||
Usage
|
||||
strip-ansi <input-file> > <output-file>
|
||||
cat <input-file> | strip-ansi > <output-file>
|
||||
|
||||
Example
|
||||
strip-ansi unicorn.txt > unicorn-stripped.txt
|
||||
```
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
29
node_modules/grunt-shell/node_modules/chalk/node_modules/supports-color/cli.js
generated
vendored
Executable file
29
node_modules/grunt-shell/node_modules/chalk/node_modules/supports-color/cli.js
generated
vendored
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env node
|
||||
'use strict';
|
||||
var pkg = require('./package.json');
|
||||
var supportsColor = require('./');
|
||||
var argv = process.argv.slice(2);
|
||||
|
||||
function help() {
|
||||
console.log([
|
||||
'',
|
||||
' ' + pkg.description,
|
||||
'',
|
||||
' Usage',
|
||||
' supports-color',
|
||||
'',
|
||||
' Exits with code 0 if color is supported and 1 if not'
|
||||
].join('\n'));
|
||||
}
|
||||
|
||||
if (argv.indexOf('--help') !== -1) {
|
||||
help();
|
||||
return;
|
||||
}
|
||||
|
||||
if (argv.indexOf('--version') !== -1) {
|
||||
console.log(pkg.version);
|
||||
return;
|
||||
}
|
||||
|
||||
process.exit(supportsColor ? 0 : 1);
|
||||
43
node_modules/grunt-shell/node_modules/chalk/node_modules/supports-color/index.js
generated
vendored
Normal file
43
node_modules/grunt-shell/node_modules/chalk/node_modules/supports-color/index.js
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
'use strict';
|
||||
var argv = process.argv;
|
||||
|
||||
module.exports = (function () {
|
||||
if ('FORCE_COLOR' in process.env) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (argv.indexOf('--no-color') !== -1 ||
|
||||
argv.indexOf('--no-colors') !== -1 ||
|
||||
argv.indexOf('--color=false') !== -1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (argv.indexOf('--color') !== -1 ||
|
||||
argv.indexOf('--colors') !== -1 ||
|
||||
argv.indexOf('--color=true') !== -1 ||
|
||||
argv.indexOf('--color=always') !== -1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (process.stdout && !process.stdout.isTTY) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (process.platform === 'win32') {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ('COLORTERM' in process.env) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (process.env.TERM === 'dumb') {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
})();
|
||||
21
node_modules/grunt-shell/node_modules/chalk/node_modules/supports-color/license
generated
vendored
Normal file
21
node_modules/grunt-shell/node_modules/chalk/node_modules/supports-color/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
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.
|
||||
84
node_modules/grunt-shell/node_modules/chalk/node_modules/supports-color/package.json
generated
vendored
Normal file
84
node_modules/grunt-shell/node_modules/chalk/node_modules/supports-color/package.json
generated
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
{
|
||||
"name": "supports-color",
|
||||
"version": "1.3.1",
|
||||
"description": "Detect whether a terminal supports color",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sindresorhus/supports-color"
|
||||
},
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "jbnicolai",
|
||||
"email": "jappelman@xebia.com"
|
||||
}
|
||||
],
|
||||
"bin": {
|
||||
"supports-color": "cli.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.8.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"cli.js"
|
||||
],
|
||||
"keywords": [
|
||||
"cli",
|
||||
"bin",
|
||||
"color",
|
||||
"colour",
|
||||
"colors",
|
||||
"terminal",
|
||||
"console",
|
||||
"cli",
|
||||
"ansi",
|
||||
"styles",
|
||||
"tty",
|
||||
"rgb",
|
||||
"256",
|
||||
"shell",
|
||||
"xterm",
|
||||
"command-line",
|
||||
"support",
|
||||
"supports",
|
||||
"capability",
|
||||
"detect"
|
||||
],
|
||||
"devDependencies": {
|
||||
"mocha": "*",
|
||||
"require-uncached": "^1.0.2"
|
||||
},
|
||||
"gitHead": "09f1b4c336cee7269b4c8b3a8880054a23fcb35e",
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/supports-color/issues"
|
||||
},
|
||||
"homepage": "https://github.com/sindresorhus/supports-color",
|
||||
"_id": "supports-color@1.3.1",
|
||||
"_shasum": "15758df09d8ff3b4acc307539fabe27095e1042d",
|
||||
"_from": "supports-color@^1.3.0",
|
||||
"_npmVersion": "2.5.1",
|
||||
"_nodeVersion": "0.12.0",
|
||||
"_npmUser": {
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
},
|
||||
"dist": {
|
||||
"shasum": "15758df09d8ff3b4acc307539fabe27095e1042d",
|
||||
"tarball": "http://registry.npmjs.org/supports-color/-/supports-color-1.3.1.tgz"
|
||||
},
|
||||
"directories": {},
|
||||
"_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-1.3.1.tgz"
|
||||
}
|
||||
46
node_modules/grunt-shell/node_modules/chalk/node_modules/supports-color/readme.md
generated
vendored
Normal file
46
node_modules/grunt-shell/node_modules/chalk/node_modules/supports-color/readme.md
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
# supports-color [](https://travis-ci.org/sindresorhus/supports-color)
|
||||
|
||||
> Detect whether a terminal supports color
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save supports-color
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var supportsColor = require('supports-color');
|
||||
|
||||
if (supportsColor) {
|
||||
console.log('Terminal supports color');
|
||||
}
|
||||
```
|
||||
|
||||
It obeys the `--color` and `--no-color` CLI flags.
|
||||
|
||||
For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`.
|
||||
|
||||
|
||||
## CLI
|
||||
|
||||
```
|
||||
$ npm install --global supports-color
|
||||
```
|
||||
|
||||
```
|
||||
$ supports-color --help
|
||||
|
||||
Usage
|
||||
supports-color
|
||||
|
||||
Exits with code 0 if color is supported and 1 if not
|
||||
```
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
82
node_modules/grunt-shell/node_modules/chalk/package.json
generated
vendored
Normal file
82
node_modules/grunt-shell/node_modules/chalk/package.json
generated
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
{
|
||||
"name": "chalk",
|
||||
"version": "1.0.0",
|
||||
"description": "Terminal string styling done right. Much color.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sindresorhus/chalk"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "jbnicolai",
|
||||
"email": "jappelman@xebia.com"
|
||||
}
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha",
|
||||
"bench": "matcha benchmark.js"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"keywords": [
|
||||
"color",
|
||||
"colour",
|
||||
"colors",
|
||||
"terminal",
|
||||
"console",
|
||||
"cli",
|
||||
"string",
|
||||
"ansi",
|
||||
"styles",
|
||||
"tty",
|
||||
"formatting",
|
||||
"rgb",
|
||||
"256",
|
||||
"shell",
|
||||
"xterm",
|
||||
"log",
|
||||
"logging",
|
||||
"command-line",
|
||||
"text"
|
||||
],
|
||||
"dependencies": {
|
||||
"ansi-styles": "^2.0.1",
|
||||
"escape-string-regexp": "^1.0.2",
|
||||
"has-ansi": "^1.0.3",
|
||||
"strip-ansi": "^2.0.1",
|
||||
"supports-color": "^1.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"matcha": "^0.6.0",
|
||||
"mocha": "*"
|
||||
},
|
||||
"gitHead": "8864d3563313ed15574a38dd5c9d5966080c46ce",
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/chalk/issues"
|
||||
},
|
||||
"homepage": "https://github.com/sindresorhus/chalk",
|
||||
"_id": "chalk@1.0.0",
|
||||
"_shasum": "b3cf4ed0ff5397c99c75b8f679db2f52831f96dc",
|
||||
"_from": "chalk@^1.0.0",
|
||||
"_npmVersion": "2.5.1",
|
||||
"_nodeVersion": "0.12.0",
|
||||
"_npmUser": {
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
},
|
||||
"dist": {
|
||||
"shasum": "b3cf4ed0ff5397c99c75b8f679db2f52831f96dc",
|
||||
"tarball": "http://registry.npmjs.org/chalk/-/chalk-1.0.0.tgz"
|
||||
},
|
||||
"directories": {},
|
||||
"_resolved": "https://registry.npmjs.org/chalk/-/chalk-1.0.0.tgz"
|
||||
}
|
||||
197
node_modules/grunt-shell/node_modules/chalk/readme.md
generated
vendored
Normal file
197
node_modules/grunt-shell/node_modules/chalk/readme.md
generated
vendored
Normal file
@@ -0,0 +1,197 @@
|
||||
<h1 align="center">
|
||||
<br>
|
||||
<img width="360" src="https://cdn.rawgit.com/sindresorhus/chalk/19935d6484811c5e468817f846b7b3d417d7bf4a/logo.svg" alt="chalk">
|
||||
<br>
|
||||
<br>
|
||||
</h1>
|
||||
|
||||
> Terminal string styling done right
|
||||
|
||||
[](https://travis-ci.org/sindresorhus/chalk) [](https://www.youtube.com/watch?v=Sm368W0OsHo)
|
||||
|
||||
[colors.js](https://github.com/Marak/colors.js) used to be 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.**
|
||||
|
||||

|
||||
|
||||
|
||||
## Why
|
||||
|
||||
- Highly performant
|
||||
- Doesn't extend `String.prototype`
|
||||
- Expressive API
|
||||
- Ability to nest styles
|
||||
- Clean and focused
|
||||
- Auto-detects color support
|
||||
- Actively maintained
|
||||
- [Used by ~3000 modules](https://www.npmjs.com/browse/depended/chalk)
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save chalk
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
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
|
||||
chalk.blue('Hello world!');
|
||||
|
||||
// combine styled and normal strings
|
||||
chalk.blue('Hello') + 'World' + chalk.red('!');
|
||||
|
||||
// compose multiple styles using the chainable API
|
||||
chalk.blue.bgRed.bold('Hello world!');
|
||||
|
||||
// pass in multiple arguments
|
||||
chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz');
|
||||
|
||||
// nest styles
|
||||
chalk.red('Hello', chalk.underline.bgBlue('world') + '!');
|
||||
|
||||
// nest styles of the same type even (color, underline, background)
|
||||
chalk.green(
|
||||
'I am a green line ' +
|
||||
chalk.blue.underline.bold('with a blue substring') +
|
||||
' that becomes green again!'
|
||||
);
|
||||
```
|
||||
|
||||
Easily define your own themes.
|
||||
|
||||
```js
|
||||
var chalk = require('chalk');
|
||||
var error = chalk.bold.red;
|
||||
console.log(error('Error!'));
|
||||
```
|
||||
|
||||
Take advantage of console.log [string substitution](http://nodejs.org/docs/latest/api/console.html#console_console_log_data).
|
||||
|
||||
```js
|
||||
var name = 'Sindre';
|
||||
console.log(chalk.green('Hello %s'), name);
|
||||
//=> Hello Sindre
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### chalk.`<style>[.<style>...](string, [string...])`
|
||||
|
||||
Example: `chalk.red.bold.underline('Hello', 'world');`
|
||||
|
||||
Chain [styles](#styles) and call the last one as a method with a string argument. Order doesn't matter, and later styles take precedent in case of a conflict. This simply means that `Chalk.red.yellow.green` is equivalent to `Chalk.green`.
|
||||
|
||||
Multiple arguments will be separated by space.
|
||||
|
||||
### chalk.enabled
|
||||
|
||||
Color support is automatically detected, but you can override it by setting the `enabled` property. You should however only do this in your own code as it applies globally to all chalk consumers.
|
||||
|
||||
If you need to change this in a reusable module create a new instance:
|
||||
|
||||
```js
|
||||
var ctx = new chalk.constructor({enabled: false});
|
||||
```
|
||||
|
||||
### chalk.supportsColor
|
||||
|
||||
Detect whether the terminal [supports color](https://github.com/sindresorhus/supports-color). Used internally and handled for you, but exposed for convenience.
|
||||
|
||||
Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`.
|
||||
|
||||
### chalk.styles
|
||||
|
||||
Exposes the styles as [ANSI escape codes](https://github.com/sindresorhus/ansi-styles).
|
||||
|
||||
Generally not useful, but you might need just the `.open` or `.close` escape code if you're mixing externally styled strings with your own.
|
||||
|
||||
```js
|
||||
var chalk = require('chalk');
|
||||
|
||||
console.log(chalk.styles.red);
|
||||
//=> {open: '\u001b[31m', close: '\u001b[39m'}
|
||||
|
||||
console.log(chalk.styles.red.open + 'Hello' + chalk.styles.red.close);
|
||||
```
|
||||
|
||||
### chalk.hasColor(string)
|
||||
|
||||
Check whether a string [has color](https://github.com/sindresorhus/has-ansi).
|
||||
|
||||
### chalk.stripColor(string)
|
||||
|
||||
[Strip color](https://github.com/sindresorhus/strip-ansi) from a string.
|
||||
|
||||
Can be useful in combination with `.supportsColor` to strip color on externally styled text when it's not supported.
|
||||
|
||||
Example:
|
||||
|
||||
```js
|
||||
var chalk = require('chalk');
|
||||
var styledString = getText();
|
||||
|
||||
if (!chalk.supportsColor) {
|
||||
styledString = chalk.stripColor(styledString);
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Styles
|
||||
|
||||
### Modifiers
|
||||
|
||||
- `reset`
|
||||
- `bold`
|
||||
- `dim`
|
||||
- `italic` *(not widely supported)*
|
||||
- `underline`
|
||||
- `inverse`
|
||||
- `hidden`
|
||||
- `strikethrough` *(not widely supported)*
|
||||
|
||||
### Colors
|
||||
|
||||
- `black`
|
||||
- `red`
|
||||
- `green`
|
||||
- `yellow`
|
||||
- `blue` *(on Windows the bright version is used as normal blue is illegible)*
|
||||
- `magenta`
|
||||
- `cyan`
|
||||
- `white`
|
||||
- `gray`
|
||||
|
||||
### Background colors
|
||||
|
||||
- `bgBlack`
|
||||
- `bgRed`
|
||||
- `bgGreen`
|
||||
- `bgYellow`
|
||||
- `bgBlue`
|
||||
- `bgMagenta`
|
||||
- `bgCyan`
|
||||
- `bgWhite`
|
||||
|
||||
|
||||
## 256-colors
|
||||
|
||||
Chalk does not support support anything other than the base eight colors, which guarantees it will work on all terminals and systems. Some terminals, specifically `xterm` compliant ones, will support the full range of 8-bit colors. For this the lower level [ansi-256-colors](https://github.com/jbnicolai/ansi-256-colors) package can be used.
|
||||
|
||||
|
||||
## Windows
|
||||
|
||||
If you're on Windows, do yourself a favor and use [`cmder`](http://bliker.github.io/cmder/) instead of `cmd.exe`.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
68
node_modules/grunt-shell/package.json
generated
vendored
Normal file
68
node_modules/grunt-shell/package.json
generated
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"name": "grunt-shell",
|
||||
"version": "1.1.2",
|
||||
"description": "Run shell commands",
|
||||
"keywords": [
|
||||
"gruntplugin",
|
||||
"shell",
|
||||
"command",
|
||||
"cmd",
|
||||
"exec",
|
||||
"spawn",
|
||||
"process",
|
||||
"cli"
|
||||
],
|
||||
"license": "MIT",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "http://sindresorhus.com"
|
||||
},
|
||||
"files": [
|
||||
"tasks"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sindresorhus/grunt-shell"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "grunt"
|
||||
},
|
||||
"dependencies": {
|
||||
"chalk": "^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"grunt": "^0.4.5",
|
||||
"grunt-cli": "^0.1.13"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"gitHead": "e25871ae9a1d15ffa464efd7ff9a90c35570c53b",
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/grunt-shell/issues"
|
||||
},
|
||||
"homepage": "https://github.com/sindresorhus/grunt-shell",
|
||||
"_id": "grunt-shell@1.1.2",
|
||||
"_shasum": "473e465301d29d0b56df16fe310798ce714d0956",
|
||||
"_from": "grunt-shell@",
|
||||
"_npmVersion": "2.5.1",
|
||||
"_nodeVersion": "0.12.0",
|
||||
"_npmUser": {
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
}
|
||||
],
|
||||
"dist": {
|
||||
"shasum": "473e465301d29d0b56df16fe310798ce714d0956",
|
||||
"tarball": "http://registry.npmjs.org/grunt-shell/-/grunt-shell-1.1.2.tgz"
|
||||
},
|
||||
"directories": {},
|
||||
"_resolved": "https://registry.npmjs.org/grunt-shell/-/grunt-shell-1.1.2.tgz",
|
||||
"readme": "ERROR: No README data found!"
|
||||
}
|
||||
245
node_modules/grunt-shell/readme.md
generated
vendored
Normal file
245
node_modules/grunt-shell/readme.md
generated
vendored
Normal file
@@ -0,0 +1,245 @@
|
||||
# grunt-shell [](https://travis-ci.org/sindresorhus/grunt-shell)
|
||||
|
||||
> Run shell commands
|
||||
|
||||
A good way to interact with other CLI tools. E.g. compiling Compass `compass compile` or get the current git branch `git branch`.
|
||||
|
||||
**Use [StackOverflow](http://stackoverflow.com/questions/tagged/gruntjs) for support questions.**
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
$ npm install --save-dev grunt-shell
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
require('load-grunt-tasks')(grunt); // npm install --save-dev load-grunt-tasks
|
||||
|
||||
grunt.initConfig({
|
||||
shell: {
|
||||
options: {
|
||||
stderr: false
|
||||
},
|
||||
target: {
|
||||
command: 'ls'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
grunt.registerTask('default', ['shell']);
|
||||
```
|
||||
|
||||
|
||||
## Examples
|
||||
|
||||
### Run command
|
||||
|
||||
Create a folder named `test`.
|
||||
|
||||
```js
|
||||
grunt.initConfig({
|
||||
shell: {
|
||||
makeDir: {
|
||||
command: 'mkdir test'
|
||||
}
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
The `command` property supports templates:
|
||||
|
||||
```js
|
||||
grunt.initConfig({
|
||||
testDir: 'test',
|
||||
shell: {
|
||||
makeDir: {
|
||||
command: 'mkdir <%= testDir %>'
|
||||
}
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
You can also supply a function that returns the command:
|
||||
|
||||
```js
|
||||
grunt.initConfig({
|
||||
shell: {
|
||||
hello: {
|
||||
command: function () {
|
||||
return 'echo hello';
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
Which can also take arguments:
|
||||
|
||||
```js
|
||||
module.exports = function(grunt) {
|
||||
grunt.loadNpmTasks('grunt-shell');
|
||||
grunt.initConfig({
|
||||
shell: {
|
||||
greet: {
|
||||
command: function (greeting) {
|
||||
return 'echo ' + greeting;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
grunt.registerTask('default', ['shell:greet:hello']);
|
||||
}
|
||||
```
|
||||
|
||||
### Run command and display the output
|
||||
|
||||
Output a directory listing in your Terminal.
|
||||
|
||||
```js
|
||||
grunt.initConfig({
|
||||
shell: {
|
||||
dirListing: {
|
||||
command: 'ls'
|
||||
}
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Custom callback
|
||||
|
||||
Do whatever you want with the output.
|
||||
|
||||
```js
|
||||
function log(err, stdout, stderr, cb) {
|
||||
console.log(stdout);
|
||||
cb();
|
||||
}
|
||||
|
||||
grunt.initConfig({
|
||||
shell: {
|
||||
dirListing: {
|
||||
command: 'ls',
|
||||
options: {
|
||||
callback: log
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Option passed to the .exec() method
|
||||
|
||||
Run a command in another directory. In this example we run it in a subfolder using the `cwd` (current working directory) option.
|
||||
|
||||
```js
|
||||
grunt.initConfig({
|
||||
shell: {
|
||||
subfolderLs: {
|
||||
command: 'ls',
|
||||
options: {
|
||||
stderr: false,
|
||||
execOptions: {
|
||||
cwd: 'tasks'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Multiple commands
|
||||
|
||||
Run multiple commands by placing them in an array which is joined using `&&` or `;`. `&&` means run this only if the previous command succeeded. You can also use `&` to have the commands run concurrently (by executing all commands except the last one in a subshell).
|
||||
|
||||
```js
|
||||
grunt.initConfig({
|
||||
shell: {
|
||||
multiple: {
|
||||
command: [
|
||||
'mkdir test',
|
||||
'cd test',
|
||||
'ls'
|
||||
].join('&&')
|
||||
}
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
## Config
|
||||
|
||||
### command
|
||||
|
||||
*Required*
|
||||
Type: `string`, `function`
|
||||
|
||||
The command you want to run or a function which returns it. Supports underscore templates.
|
||||
|
||||
## Options
|
||||
|
||||
### stdout
|
||||
|
||||
Type: `boolean`
|
||||
Default: `true`
|
||||
|
||||
Show stdout in the Terminal.
|
||||
|
||||
### stderr
|
||||
|
||||
Type: `boolean`
|
||||
Default: `true`
|
||||
|
||||
Show stderr in the Terminal.
|
||||
|
||||
### stdin
|
||||
|
||||
Type: `boolean`
|
||||
Default: `true`
|
||||
|
||||
Forward the terminal's stdin to the command.
|
||||
|
||||
### failOnError
|
||||
|
||||
Type: `boolean`
|
||||
Default: `true`
|
||||
|
||||
Fail task if it encounters an error. Does not apply if you specify a `callback`.
|
||||
|
||||
### stdinRawMode
|
||||
|
||||
Type: `boolean`
|
||||
Default: `false`
|
||||
|
||||
This sets `stdin` to [act as a raw device](http://nodejs.org/api/tty.html#tty_rs_setrawmode_mode).
|
||||
|
||||
### callback(err, stdout, stderr, cb)
|
||||
|
||||
Type: `function`
|
||||
Default: `function () {}`
|
||||
|
||||
Lets you override the default callback with your own.
|
||||
|
||||
**Make sure to call the `cb` method when you're done.**
|
||||
|
||||
### execOptions
|
||||
|
||||
Type: `object`
|
||||
|
||||
Specify some options to be passed to the [.exec()](http://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback) method:
|
||||
|
||||
- `cwd` String *Current working directory of the child process*
|
||||
- `env` Object *Environment key-value pairs*
|
||||
- `setsid` Boolean
|
||||
- `encoding` String *(Default: 'utf8')*
|
||||
- `timeout` Number *(Default: 0)*
|
||||
- `maxBuffer` Number *(Default: 200\*1024)*
|
||||
- `killSignal` String *(Default: 'SIGTERM')*
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
65
node_modules/grunt-shell/tasks/shell.js
generated
vendored
Normal file
65
node_modules/grunt-shell/tasks/shell.js
generated
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
'use strict';
|
||||
var exec = require('child_process').exec;
|
||||
var chalk = require('chalk');
|
||||
|
||||
module.exports = function (grunt) {
|
||||
grunt.registerMultiTask('shell', 'Run shell commands', function () {
|
||||
var cb = this.async();
|
||||
var options = this.options({
|
||||
stdout: true,
|
||||
stderr: true,
|
||||
stdin: true,
|
||||
failOnError: true,
|
||||
stdinRawMode: false
|
||||
});
|
||||
var cmd = this.data.command;
|
||||
|
||||
if (cmd === undefined) {
|
||||
throw new Error('`command` required');
|
||||
}
|
||||
|
||||
cmd = grunt.template.process(typeof cmd === 'function' ? cmd.apply(grunt, arguments) : cmd);
|
||||
|
||||
var cp = exec(cmd, options.execOptions, function (err, stdout, stderr) {
|
||||
if (typeof options.callback === 'function') {
|
||||
options.callback.call(this, err, stdout, stderr, cb);
|
||||
} else {
|
||||
if (err && options.failOnError) {
|
||||
grunt.warn(err);
|
||||
}
|
||||
cb();
|
||||
}
|
||||
}.bind(this));
|
||||
|
||||
var captureOutput = function (child, output) {
|
||||
if (grunt.option('color') === false) {
|
||||
child.on('data', function (data) {
|
||||
output.write(chalk.stripColor(data));
|
||||
});
|
||||
} else {
|
||||
child.pipe(output);
|
||||
}
|
||||
};
|
||||
|
||||
grunt.verbose.writeln('Command:', chalk.yellow(cmd));
|
||||
|
||||
if (options.stdout || grunt.option('verbose')) {
|
||||
captureOutput(cp.stdout, process.stdout);
|
||||
}
|
||||
|
||||
if (options.stderr || grunt.option('verbose')) {
|
||||
captureOutput(cp.stderr, process.stderr);
|
||||
}
|
||||
|
||||
if (options.stdin) {
|
||||
process.stdin.resume();
|
||||
process.stdin.setEncoding('utf8');
|
||||
|
||||
if (options.stdinRawMode && process.stdin.isTTY) {
|
||||
process.stdin.setRawMode(true);
|
||||
}
|
||||
|
||||
process.stdin.pipe(cp.stdin);
|
||||
}
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user