push all website files

This commit is contained in:
Jacob Levine
2019-01-06 13:14:45 -06:00
parent d7301e26c3
commit d2d5d4c04e
15662 changed files with 2166516 additions and 0 deletions

View 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.

View File

@@ -0,0 +1,71 @@
# ansistyles [![build status](https://secure.travis-ci.org/thlorenz/ansistyles.png)](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).

View 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;

View 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"
}

View 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');