mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2025-10-28 03:36:51 +00:00
push all website files
This commit is contained in:
23
website/node_modules/npm/node_modules/ansistyles/LICENSE
generated
vendored
Normal file
23
website/node_modules/npm/node_modules/ansistyles/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
Copyright 2013 Thorsten Lorenz.
|
||||
All rights reserved.
|
||||
|
||||
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.
|
||||
71
website/node_modules/npm/node_modules/ansistyles/README.md
generated
vendored
Normal file
71
website/node_modules/npm/node_modules/ansistyles/README.md
generated
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
# ansistyles [](http://next.travis-ci.org/thlorenz/ansistyles)
|
||||
|
||||
Functions that surround a string with ansistyle codes so it prints in style.
|
||||
|
||||
In case you need colors, like `red`, have a look at [ansicolors](https://github.com/thlorenz/ansicolors).
|
||||
|
||||
## Installation
|
||||
|
||||
npm install ansistyles
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var styles = require('ansistyles');
|
||||
|
||||
console.log(styles.bright('hello world')); // prints hello world in 'bright' white
|
||||
console.log(styles.underline('hello world')); // prints hello world underlined
|
||||
console.log(styles.inverse('hello world')); // prints hello world black on white
|
||||
```
|
||||
|
||||
## Combining with ansicolors
|
||||
|
||||
Get the ansicolors module:
|
||||
|
||||
npm install ansicolors
|
||||
|
||||
```js
|
||||
var styles = require('ansistyles')
|
||||
, colors = require('ansicolors');
|
||||
|
||||
console.log(
|
||||
// prints hello world underlined in blue on a green background
|
||||
colors.bgGreen(colors.blue(styles.underline('hello world')))
|
||||
);
|
||||
```
|
||||
|
||||
## Tests
|
||||
|
||||
Look at the [tests](https://github.com/thlorenz/ansistyles/blob/master/test/ansistyles.js) to see more examples and/or run them via:
|
||||
|
||||
npm explore ansistyles && npm test
|
||||
|
||||
## More Styles
|
||||
|
||||
As you can see from [here](https://github.com/thlorenz/ansistyles/blob/master/ansistyles.js#L4-L15), more styles are available,
|
||||
but didn't have any effect on the terminals that I tested on Mac Lion and Ubuntu Linux.
|
||||
|
||||
I included them for completeness, but didn't show them in the examples because they seem to have no effect.
|
||||
|
||||
### reset
|
||||
|
||||
A style reset function is also included, please note however that this is not nestable.
|
||||
|
||||
Therefore the below only underlines `hell` only, but not `world`.
|
||||
|
||||
```js
|
||||
console.log(styles.underline('hell' + styles.reset('o') + ' world'));
|
||||
```
|
||||
|
||||
It is essentially the same as:
|
||||
|
||||
```js
|
||||
console.log(styles.underline('hell') + styles.reset('') + 'o world');
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Alternatives
|
||||
|
||||
**ansistyles** tries to meet simple use cases with a very simple API. However, if you need a more powerful ansi formatting tool,
|
||||
I'd suggest to look at the [features](https://github.com/TooTallNate/ansi.js#features) of the [ansi module](https://github.com/TooTallNate/ansi.js).
|
||||
38
website/node_modules/npm/node_modules/ansistyles/ansistyles.js
generated
vendored
Normal file
38
website/node_modules/npm/node_modules/ansistyles/ansistyles.js
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
'use strict';
|
||||
|
||||
/*
|
||||
* Info: http://www.termsys.demon.co.uk/vtansi.htm#colors
|
||||
* Following caveats
|
||||
* bright - brightens the color (bold-blue is same as brigthtBlue)
|
||||
* dim - nothing on Mac or Linux
|
||||
* italic - nothing on Mac or Linux
|
||||
* underline - underlines string
|
||||
* blink - nothing on Mac or linux
|
||||
* inverse - background becomes foreground and vice versa
|
||||
*
|
||||
* In summary, the only styles that work are:
|
||||
* - bright, underline and inverse
|
||||
* - the others are only included for completeness
|
||||
*/
|
||||
|
||||
var styleNums = {
|
||||
reset : [0, 22]
|
||||
, bright : [1, 22]
|
||||
, dim : [2, 22]
|
||||
, italic : [3, 23]
|
||||
, underline : [4, 24]
|
||||
, blink : [5, 25]
|
||||
, inverse : [7, 27]
|
||||
}
|
||||
, styles = {}
|
||||
;
|
||||
|
||||
Object.keys(styleNums).forEach(function (k) {
|
||||
styles[k] = function (s) {
|
||||
var open = styleNums[k][0]
|
||||
, close = styleNums[k][1];
|
||||
return '\u001b[' + open + 'm' + s + '\u001b[' + close + 'm';
|
||||
};
|
||||
});
|
||||
|
||||
module.exports = styles;
|
||||
58
website/node_modules/npm/node_modules/ansistyles/package.json
generated
vendored
Normal file
58
website/node_modules/npm/node_modules/ansistyles/package.json
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"ansistyles@0.1.3",
|
||||
"/Users/rebecca/code/npm"
|
||||
]
|
||||
],
|
||||
"_from": "ansistyles@0.1.3",
|
||||
"_id": "ansistyles@0.1.3",
|
||||
"_inBundle": true,
|
||||
"_integrity": "sha1-XeYEFb2gcbs3EnhUyGT0GyMlRTk=",
|
||||
"_location": "/npm/ansistyles",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "ansistyles@0.1.3",
|
||||
"name": "ansistyles",
|
||||
"escapedName": "ansistyles",
|
||||
"rawSpec": "0.1.3",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "0.1.3"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/npm"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/ansistyles/-/ansistyles-0.1.3.tgz",
|
||||
"_spec": "0.1.3",
|
||||
"_where": "/Users/rebecca/code/npm",
|
||||
"author": {
|
||||
"name": "Thorsten Lorenz",
|
||||
"email": "thlorenz@gmx.de",
|
||||
"url": "thlorenz.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/thlorenz/ansistyles/issues"
|
||||
},
|
||||
"description": "Functions that surround a string with ansistyle codes so it prints in style.",
|
||||
"gitHead": "27bf1bc65231bcc7fd109bf13b13601b51f8cd04",
|
||||
"homepage": "https://github.com/thlorenz/ansistyles#readme",
|
||||
"keywords": [
|
||||
"ansi",
|
||||
"style",
|
||||
"terminal",
|
||||
"console"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "ansistyles.js",
|
||||
"name": "ansistyles",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/thlorenz/ansistyles.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node test/ansistyles.js"
|
||||
},
|
||||
"version": "0.1.3"
|
||||
}
|
||||
15
website/node_modules/npm/node_modules/ansistyles/test/ansistyles.js
generated
vendored
Normal file
15
website/node_modules/npm/node_modules/ansistyles/test/ansistyles.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
'use strict';
|
||||
/*jshint asi: true */
|
||||
var assert = require('assert')
|
||||
, styles = require('../')
|
||||
|
||||
function inspect(obj, depth) {
|
||||
console.log(require('util').inspect(obj, false, depth || 5, true));
|
||||
}
|
||||
|
||||
assert.equal(styles.reset('reset'), '\u001b[0mreset\u001b[22m', 'reset')
|
||||
assert.equal(styles.underline('underlined'), '\u001b[4munderlined\u001b[24m', 'underline')
|
||||
assert.equal(styles.bright('bright'), '\u001b[1mbright\u001b[22m', 'bright')
|
||||
assert.equal(styles.inverse('inversed'), '\u001b[7minversed\u001b[27m', 'inverse')
|
||||
|
||||
console.log('OK');
|
||||
Reference in New Issue
Block a user