Initial website

This commit is contained in:
Oliver Kennedy 2015-12-02 18:21:44 -05:00
commit c5a9b9b843
1630 changed files with 194549 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
site

10
Makefile Normal file
View file

@ -0,0 +1,10 @@
all:
node build.js
setup:
brew install node
sudo npm install --global metalsmith
.PHONY: all

26
build.js Normal file
View file

@ -0,0 +1,26 @@
var extname = require('path').extname;
var Metalsmith = require('metalsmith');
var drafts = require('metalsmith-drafts');
var markdown = require('metalsmith-markdown');
var layouts = require('metalsmith-layouts');
var inplace = require('metalsmith-in-place');
var uglify = require('metalsmith-uglify');
var rename = require('metalsmith-rename');
/**
* Build.
*/
var metalsmith = Metalsmith(__dirname)
.source('./src')
.destination('./site')
.use(drafts())
.use(markdown())
// .use(inplace({ "engine" : "handlebars" }))
.use(layouts({ "engine" : "handlebars" }))
// .use(uglify()) h
// .use(rename([[/\.md/, '.html']]))
.build(function(err){
if (err) throw err;
});

1
node_modules/.bin/_metalsmith generated vendored Symbolic link
View file

@ -0,0 +1 @@
../metalsmith/bin/_metalsmith

1
node_modules/.bin/esparse generated vendored Symbolic link
View file

@ -0,0 +1 @@
../esprima/bin/esparse.js

1
node_modules/.bin/esvalidate generated vendored Symbolic link
View file

@ -0,0 +1 @@
../esprima/bin/esvalidate.js

1
node_modules/.bin/handlebars generated vendored Symbolic link
View file

@ -0,0 +1 @@
../handlebars/bin/handlebars

1
node_modules/.bin/has-ansi generated vendored Symbolic link
View file

@ -0,0 +1 @@
../has-ansi/cli.js

1
node_modules/.bin/js-yaml generated vendored Symbolic link
View file

@ -0,0 +1 @@
../js-yaml/bin/js-yaml.js

1
node_modules/.bin/marked generated vendored Symbolic link
View file

@ -0,0 +1 @@
../marked/bin/marked

1
node_modules/.bin/metalsmith generated vendored Symbolic link
View file

@ -0,0 +1 @@
../metalsmith/bin/metalsmith

1
node_modules/.bin/mkdirp generated vendored Symbolic link
View file

@ -0,0 +1 @@
../mkdirp/bin/cmd.js

1
node_modules/.bin/ncp generated vendored Symbolic link
View file

@ -0,0 +1 @@
../ncp/bin/ncp

1
node_modules/.bin/rimraf generated vendored Symbolic link
View file

@ -0,0 +1 @@
../rimraf/bin.js

1
node_modules/.bin/strip-ansi generated vendored Symbolic link
View file

@ -0,0 +1 @@
../strip-ansi/cli.js

1
node_modules/.bin/supports-color generated vendored Symbolic link
View file

@ -0,0 +1 @@
../supports-color/cli.js

1
node_modules/.bin/uglifyjs generated vendored Symbolic link
View file

@ -0,0 +1 @@
../uglify-js/bin/uglifyjs

1
node_modules/.bin/win-fork generated vendored Symbolic link
View file

@ -0,0 +1 @@
../win-fork/bin/win-spawn

1
node_modules/.bin/win-line-endings generated vendored Symbolic link
View file

@ -0,0 +1 @@
../win-fork/bin/win-line-endings

1
node_modules/.bin/win-spawn generated vendored Symbolic link
View file

@ -0,0 +1 @@
../win-fork/bin/win-spawn

1
node_modules/absolute/.npmignore generated vendored Normal file
View file

@ -0,0 +1 @@
node_modules

33
node_modules/absolute/README.md generated vendored Normal file
View file

@ -0,0 +1,33 @@
absolute
========
Test if a path (string) is absolute
Installation
------------
npm install absolute
Usage
-----
``` js
var absolute = require('absolute');
absolute('/home/dave');
// => true
absolute('/something');
// => true
absolute('./myfile');
// => false
absolute('temp');
// => false
```
License
-------
MIT

7
node_modules/absolute/absolute.js generated vendored Normal file
View file

@ -0,0 +1,7 @@
var path = require('path');
module.exports = path.isAbsolute ? path.isAbsolute.bind(path) : absolute;
function absolute(s) {
return path.resolve(s) === s;
}

72
node_modules/absolute/package.json generated vendored Normal file
View file

@ -0,0 +1,72 @@
{
"_args": [
[
"absolute@0.0.1",
"/Users/okennedy/Desktop/Website/node_modules/metalsmith"
]
],
"_from": "absolute@0.0.1",
"_id": "absolute@0.0.1",
"_inCache": true,
"_installable": true,
"_location": "/absolute",
"_nodeVersion": "0.12.0",
"_npmUser": {
"email": "dave@daveeddy.com",
"name": "bahamas10"
},
"_npmVersion": "2.5.1",
"_phantomChildren": {},
"_requested": {
"name": "absolute",
"raw": "absolute@0.0.1",
"rawSpec": "0.0.1",
"scope": null,
"spec": "0.0.1",
"type": "version"
},
"_requiredBy": [
"/metalsmith"
],
"_resolved": "https://registry.npmjs.org/absolute/-/absolute-0.0.1.tgz",
"_shasum": "c22822f87e1c939f579887504d9c109c4173829d",
"_shrinkwrap": null,
"_spec": "absolute@0.0.1",
"_where": "/Users/okennedy/Desktop/Website/node_modules/metalsmith",
"author": {
"email": "dave@daveeddy.com",
"name": "Dave Eddy",
"url": "http://www.daveeddy.com"
},
"bugs": {
"url": "https://github.com/bahamas10/node-absolute/issues"
},
"dependencies": {},
"description": "Test if a path (string) is absolute",
"devDependencies": {},
"directories": {},
"dist": {
"shasum": "c22822f87e1c939f579887504d9c109c4173829d",
"tarball": "http://registry.npmjs.org/absolute/-/absolute-0.0.1.tgz"
},
"gitHead": "5bbd13716944dbda77d7b7bd07c41c0aab8b96e3",
"homepage": "https://github.com/bahamas10/node-absolute",
"license": "MIT",
"main": "./absolute.js",
"maintainers": [
{
"name": "bahamas10",
"email": "dave@daveeddy.com"
}
],
"name": "absolute",
"optionalDependencies": {},
"repository": {
"type": "git",
"url": "git://github.com/bahamas10/node-absolute.git"
},
"scripts": {
"test": "for f in test/*.js; do echo \"$f\"; node \"$f\" || exit 1; done; echo Passed; exit 0"
},
"version": "0.0.1"
}

7
node_modules/absolute/test/test.js generated vendored Normal file
View file

@ -0,0 +1,7 @@
var assert = require('assert');
var absolute = require('../');
assert(absolute('/home/dave') === true);
assert(absolute('/something') === true);
assert(absolute('./myfile') === false);
assert(absolute('temp') === false);

21
node_modules/align-text/LICENSE generated vendored Normal file
View file

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015, Jon Schlinkert.
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.

236
node_modules/align-text/README.md generated vendored Normal file
View file

@ -0,0 +1,236 @@
# align-text [![NPM version](https://badge.fury.io/js/align-text.svg)](http://badge.fury.io/js/align-text) [![Build Status](https://travis-ci.org/jonschlinkert/align-text.svg)](https://travis-ci.org/jonschlinkert/align-text)
> Align the text in a string.
**Examples**
Align text values in an array:
```js
align([1, 2, 3, 100]);
//=> [' 1', ' 2', ' 3', '100']
```
Or [do stuff like this](./example.js):
[![screen shot 2015-06-09 at 2 08 34 am](https://cloud.githubusercontent.com/assets/383994/8051597/7b716fbc-0e4c-11e5-9aef-4493fd22db58.png)](./example.js)
Visit [the example](./example.js) to see how this works.
## Install
Install with [npm](https://www.npmjs.com/)
```sh
$ npm i align-text --save
```
## Usage
```js
var align = require('align-text');
align(text, callback_function_or_integer);
```
**Params**
* `text` can be a **string or array**. If a string is passed, a string will be returned. If an array is passed, an array will be returned.
* `callback|integer`: if an integer, the text will be indented by that amount. If a function, it must return an integer representing the amount of leading indentation to use as `align` loops over each line.
**Example**
```js
align(text, 4);
```
Would align:
```
abc
abc
abc
```
To:
```
abc
abc
abc
```
## callback
### params
The callback is used to determine the indentation of each line and gets the following params:
* `len` the length of the "current" line
* `longest` the length of the longest line
* `line` the current line (string) being aligned
* `lines` the array of all lines
### return
The callback may return:
* an integer that represents the number of spaces to use for padding,
* or an object with the following properties:
- `indent`: **{Number}** the amount of indentation to use. Default is `0` when an object is returned.
- `character`: **{String}** the character to use for indentation. Default is `''` (empty string) when an object is returned.
- `prefix`: **{String}** leading characters to use at the beginning of each line. `''` (empty string) when an object is returned.
**Integer example:**
```js
// calculate half the difference between the length
// of the current line and the longest line
function centerAlign(len, longest, line, lines) {
return Math.floor((longest - len) / 2);
}
```
**Object example:**
```js
function centerAlign(len, longest, line, lines) {
return {
character: '\t',
indent: Math.floor((longest - len) / 2),
prefix: '~ ',
}
}
```
## Usage examples
### Center align
Using the `centerAlign` function from above:
```js
align(text, centerAlign);
```
Would align this text:
```js
Lorem ipsum dolor sit amet
consectetur adipiscin
elit, sed do eiusmod tempor incididun
ut labore et dolor
magna aliqua. Ut enim ad mini
veniam, quis
```
Resulting in this:
```
Lorem ipsum dolor sit amet,
consectetur adipiscing
elit, sed do eiusmod tempor incididunt
ut labore et dolore
magna aliqua. Ut enim ad minim
veniam, quis
```
**Customize**
If you wanted to add more padding on the left, just pass the number in the callback.
For example, to add 4 spaces before every line:
```js
function centerAlign(len, longest, line, lines) {
return 4 + Math.floor((longest - len) / 2);
}
```
Would result in:
```
Lorem ipsum dolor sit amet,
consectetur adipiscing
elit, sed do eiusmod tempor incididunt
ut labore et dolore
magna aliqua. Ut enim ad minim
veniam, quis
```
### Bullets
```js
align(text, function (len, max, line, lines) {
return {prefix: ' - '};
});
```
Would return:
```
- Lorem ipsum dolor sit amet,
- consectetur adipiscing
- elit, sed do eiusmod tempor incididunt
- ut labore et dolore
- magna aliqua. Ut enim ad minim
- veniam, quis
```
### Different indent character
```js
align(text, function (len, max, line, lines) {
return {
indent: Math.floor((max - len) / 2),
character: '~',
};
});
```
Would return
```
~~~~~Lorem ipsum dolor sit amet,
~~~~~~~~consectetur adipiscing
elit, sed do eiusmod tempor incididunt
~~~~~~~~~ut labore et dolore
~~~~magna aliqua. Ut enim ad minim
~~~~~~~~~~~~~veniam, quis
```
## Related projects
* [center-align](https://github.com/jonschlinkert/center-align): Center-align the text in a string.
* [justify](https://github.com/bahamas10/node-justify): Left or right (or both) justify text using a custom width and character
* [longest](https://github.com/jonschlinkert/longest): Get the longest item in an array.
* [right-align](https://github.com/jonschlinkert/right-align): Right-align the text in a string.
* [repeat-string](https://github.com/jonschlinkert/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string.
* [word-wrap](https://github.com/jonschlinkert/word-wrap): Wrap words to a specified length.
## Running tests
Install dev dependencies:
```sh
$ npm i -d && npm test
```
## Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/align-text/issues/new)
## Author
**Jon Schlinkert**
+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
## License
Copyright © 2015 [Jon Schlinkert](https://github.com/jonschlinkert)
Released under the MIT license.
***
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on June 09, 2015._

52
node_modules/align-text/index.js generated vendored Normal file
View file

@ -0,0 +1,52 @@
/*!
* align-text <https://github.com/jonschlinkert/align-text>
*
* Copyright (c) 2015, Jon Schlinkert.
* Licensed under the MIT License.
*/
'use strict';
var typeOf = require('kind-of');
var repeat = require('repeat-string');
var longest = require('longest');
module.exports = function alignText(val, fn) {
var lines, type = typeOf(val);
if (type === 'array') {
lines = val;
} else if (type === 'string') {
lines = val.split(/(?:\r\n|\n)/);
} else {
throw new TypeError('align-text expects a string or array.');
}
var fnType = typeOf(fn);
var len = lines.length;
var max = longest(lines);
var res = [], i = 0;
while (len--) {
var line = String(lines[i++]);
var diff;
if (fnType === 'function') {
diff = fn(line.length, max.length, line, lines, i);
} else if (fnType === 'number') {
diff = fn;
} else {
diff = max.length - line.length;
}
if (typeOf(diff) === 'number') {
res.push(repeat(' ', diff) + line);
} else if (typeOf(diff) === 'object') {
var result = repeat(diff.character || ' ', diff.indent || 0);
res.push((diff.prefix || '') + result + line);
}
}
if (type === 'array') return res;
return res.join('\n');
};

100
node_modules/align-text/package.json generated vendored Normal file
View file

@ -0,0 +1,100 @@
{
"_args": [
[
"align-text@^0.1.0",
"/Users/okennedy/Desktop/Website/node_modules/center-align"
]
],
"_from": "align-text@>=0.1.0 <0.2.0",
"_id": "align-text@0.1.3",
"_inCache": true,
"_installable": true,
"_location": "/align-text",
"_nodeVersion": "0.12.4",
"_npmUser": {
"email": "github@sellside.com",
"name": "jonschlinkert"
},
"_npmVersion": "2.10.1",
"_phantomChildren": {},
"_requested": {
"name": "align-text",
"raw": "align-text@^0.1.0",
"rawSpec": "^0.1.0",
"scope": null,
"spec": ">=0.1.0 <0.2.0",
"type": "range"
},
"_requiredBy": [
"/center-align",
"/right-align"
],
"_resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.3.tgz",
"_shasum": "72db3983872eec2313919c9426a993a41afe93f7",
"_shrinkwrap": null,
"_spec": "align-text@^0.1.0",
"_where": "/Users/okennedy/Desktop/Website/node_modules/center-align",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
},
"bugs": {
"url": "https://github.com/jonschlinkert/align-text/issues"
},
"dependencies": {
"kind-of": "^2.0.0",
"longest": "^1.0.1",
"repeat-string": "^1.5.2"
},
"description": "Align the text in a string.",
"devDependencies": {
"mocha": "*",
"should": "*",
"word-wrap": "^1.0.3"
},
"directories": {},
"dist": {
"shasum": "72db3983872eec2313919c9426a993a41afe93f7",
"tarball": "http://registry.npmjs.org/align-text/-/align-text-0.1.3.tgz"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"gitHead": "11c2e834ff2c63f9844bddf189fea5cab921e44d",
"homepage": "https://github.com/jonschlinkert/align-text",
"keywords": [
"align",
"align-center",
"alignment",
"center",
"center-align",
"indent",
"pad",
"padding",
"right",
"right-align",
"text",
"typography"
],
"license": "MIT",
"main": "index.js",
"maintainers": [
{
"name": "jonschlinkert",
"email": "github@sellside.com"
}
],
"name": "align-text",
"optionalDependencies": {},
"repository": {
"type": "git",
"url": "git://github.com/jonschlinkert/align-text.git"
},
"scripts": {
"test": "mocha"
},
"version": "0.1.3"
}

58
node_modules/amdefine/LICENSE generated vendored Normal file
View file

@ -0,0 +1,58 @@
amdefine is released under two licenses: new BSD, and MIT. You may pick the
license that best suits your development needs. The text of both licenses are
provided below.
The "New" BSD License:
----------------------
Copyright (c) 2011-2015, The Dojo Foundation
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the Dojo Foundation nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
MIT License
-----------
Copyright (c) 2011-2015, The Dojo Foundation
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.

171
node_modules/amdefine/README.md generated vendored Normal file
View file

@ -0,0 +1,171 @@
# amdefine
A module that can be used to implement AMD's define() in Node. This allows you
to code to the AMD API and have the module work in node programs without
requiring those other programs to use AMD.
## Usage
**1)** Update your package.json to indicate amdefine as a dependency:
```javascript
"dependencies": {
"amdefine": ">=0.1.0"
}
```
Then run `npm install` to get amdefine into your project.
**2)** At the top of each module that uses define(), place this code:
```javascript
if (typeof define !== 'function') { var define = require('amdefine')(module) }
```
**Only use these snippets** when loading amdefine. If you preserve the basic structure,
with the braces, it will be stripped out when using the [RequireJS optimizer](#optimizer).
You can add spaces, line breaks and even require amdefine with a local path, but
keep the rest of the structure to get the stripping behavior.
As you may know, because `if` statements in JavaScript don't have their own scope, the var
declaration in the above snippet is made whether the `if` expression is truthy or not. If
RequireJS is loaded then the declaration is superfluous because `define` is already already
declared in the same scope in RequireJS. Fortunately JavaScript handles multiple `var`
declarations of the same variable in the same scope gracefully.
If you want to deliver amdefine.js with your code rather than specifying it as a dependency
with npm, then just download the latest release and refer to it using a relative path:
[Latest Version](https://github.com/jrburke/amdefine/raw/latest/amdefine.js)
### amdefine/intercept
Consider this very experimental.
Instead of pasting the piece of text for the amdefine setup of a `define`
variable in each module you create or consume, you can use `amdefine/intercept`
instead. It will automatically insert the above snippet in each .js file loaded
by Node.
**Warning**: you should only use this if you are creating an application that
is consuming AMD style defined()'d modules that are distributed via npm and want
to run that code in Node.
For library code where you are not sure if it will be used by others in Node or
in the browser, then explicitly depending on amdefine and placing the code
snippet above is suggested path, instead of using `amdefine/intercept`. The
intercept module affects all .js files loaded in the Node app, and it is
inconsiderate to modify global state like that unless you are also controlling
the top level app.
#### Why distribute AMD-style modules via npm?
npm has a lot of weaknesses for front-end use (installed layout is not great,
should have better support for the `baseUrl + moduleID + '.js' style of loading,
single file JS installs), but some people want a JS package manager and are
willing to live with those constraints. If that is you, but still want to author
in AMD style modules to get dynamic require([]), better direct source usage and
powerful loader plugin support in the browser, then this tool can help.
#### amdefine/intercept usage
Just require it in your top level app module (for example index.js, server.js):
```javascript
require('amdefine/intercept');
```
The module does not return a value, so no need to assign the result to a local
variable.
Then just require() code as you normally would with Node's require(). Any .js
loaded after the intercept require will have the amdefine check injected in
the .js source as it is loaded. It does not modify the source on disk, just
prepends some content to the text of the module as it is loaded by Node.
#### How amdefine/intercept works
It overrides the `Module._extensions['.js']` in Node to automatically prepend
the amdefine snippet above. So, it will affect any .js file loaded by your
app.
## define() usage
It is best if you use the anonymous forms of define() in your module:
```javascript
define(function (require) {
var dependency = require('dependency');
});
```
or
```javascript
define(['dependency'], function (dependency) {
});
```
## RequireJS optimizer integration. <a name="optimizer"></name>
Version 1.0.3 of the [RequireJS optimizer](http://requirejs.org/docs/optimization.html)
will have support for stripping the `if (typeof define !== 'function')` check
mentioned above, so you can include this snippet for code that runs in the
browser, but avoid taking the cost of the if() statement once the code is
optimized for deployment.
## Node 0.4 Support
If you want to support Node 0.4, then add `require` as the second parameter to amdefine:
```javascript
//Only if you want Node 0.4. If using 0.5 or later, use the above snippet.
if (typeof define !== 'function') { var define = require('amdefine')(module, require) }
```
## Limitations
### Synchronous vs Asynchronous
amdefine creates a define() function that is callable by your code. It will
execute and trace dependencies and call the factory function *synchronously*,
to keep the behavior in line with Node's synchronous dependency tracing.
The exception: calling AMD's callback-style require() from inside a factory
function. The require callback is called on process.nextTick():
```javascript
define(function (require) {
require(['a'], function(a) {
//'a' is loaded synchronously, but
//this callback is called on process.nextTick().
});
});
```
### Loader Plugins
Loader plugins are supported as long as they call their load() callbacks
synchronously. So ones that do network requests will not work. However plugins
like [text](http://requirejs.org/docs/api.html#text) can load text files locally.
The plugin API's `load.fromText()` is **not supported** in amdefine, so this means
transpiler plugins like the [CoffeeScript loader plugin](https://github.com/jrburke/require-cs)
will not work. This may be fixable, but it is a bit complex, and I do not have
enough node-fu to figure it out yet. See the source for amdefine.js if you want
to get an idea of the issues involved.
## Tests
To run the tests, cd to **tests** and run:
```
node all.js
node all-intercept.js
```
## License
New BSD and MIT. Check the LICENSE file for all the details.

301
node_modules/amdefine/amdefine.js generated vendored Normal file
View file

@ -0,0 +1,301 @@
/** vim: et:ts=4:sw=4:sts=4
* @license amdefine 1.0.0 Copyright (c) 2011-2015, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/jrburke/amdefine for details
*/
/*jslint node: true */
/*global module, process */
'use strict';
/**
* Creates a define for node.
* @param {Object} module the "module" object that is defined by Node for the
* current module.
* @param {Function} [requireFn]. Node's require function for the current module.
* It only needs to be passed in Node versions before 0.5, when module.require
* did not exist.
* @returns {Function} a define function that is usable for the current node
* module.
*/
function amdefine(module, requireFn) {
'use strict';
var defineCache = {},
loaderCache = {},
alreadyCalled = false,
path = require('path'),
makeRequire, stringRequire;
/**
* Trims the . and .. from an array of path segments.
* It will keep a leading path segment if a .. will become
* the first path segment, to help with module name lookups,
* which act like paths, but can be remapped. But the end result,
* all paths that use this function should look normalized.
* NOTE: this method MODIFIES the input array.
* @param {Array} ary the array of path segments.
*/
function trimDots(ary) {
var i, part;
for (i = 0; ary[i]; i+= 1) {
part = ary[i];
if (part === '.') {
ary.splice(i, 1);
i -= 1;
} else if (part === '..') {
if (i === 1 && (ary[2] === '..' || ary[0] === '..')) {
//End of the line. Keep at least one non-dot
//path segment at the front so it can be mapped
//correctly to disk. Otherwise, there is likely
//no path mapping for a path starting with '..'.
//This can still fail, but catches the most reasonable
//uses of ..
break;
} else if (i > 0) {
ary.splice(i - 1, 2);
i -= 2;
}
}
}
}
function normalize(name, baseName) {
var baseParts;
//Adjust any relative paths.
if (name && name.charAt(0) === '.') {
//If have a base name, try to normalize against it,
//otherwise, assume it is a top-level require that will
//be relative to baseUrl in the end.
if (baseName) {
baseParts = baseName.split('/');
baseParts = baseParts.slice(0, baseParts.length - 1);
baseParts = baseParts.concat(name.split('/'));
trimDots(baseParts);
name = baseParts.join('/');
}
}
return name;
}
/**
* Create the normalize() function passed to a loader plugin's
* normalize method.
*/
function makeNormalize(relName) {
return function (name) {
return normalize(name, relName);
};
}
function makeLoad(id) {
function load(value) {
loaderCache[id] = value;
}
load.fromText = function (id, text) {
//This one is difficult because the text can/probably uses
//define, and any relative paths and requires should be relative
//to that id was it would be found on disk. But this would require
//bootstrapping a module/require fairly deeply from node core.
//Not sure how best to go about that yet.
throw new Error('amdefine does not implement load.fromText');
};
return load;
}
makeRequire = function (systemRequire, exports, module, relId) {
function amdRequire(deps, callback) {
if (typeof deps === 'string') {
//Synchronous, single module require('')
return stringRequire(systemRequire, exports, module, deps, relId);
} else {
//Array of dependencies with a callback.
//Convert the dependencies to modules.
deps = deps.map(function (depName) {
return stringRequire(systemRequire, exports, module, depName, relId);
});
//Wait for next tick to call back the require call.
if (callback) {
process.nextTick(function () {
callback.apply(null, deps);
});
}
}
}
amdRequire.toUrl = function (filePath) {
if (filePath.indexOf('.') === 0) {
return normalize(filePath, path.dirname(module.filename));
} else {
return filePath;
}
};
return amdRequire;
};
//Favor explicit value, passed in if the module wants to support Node 0.4.
requireFn = requireFn || function req() {
return module.require.apply(module, arguments);
};
function runFactory(id, deps, factory) {
var r, e, m, result;
if (id) {
e = loaderCache[id] = {};
m = {
id: id,
uri: __filename,
exports: e
};
r = makeRequire(requireFn, e, m, id);
} else {
//Only support one define call per file
if (alreadyCalled) {
throw new Error('amdefine with no module ID cannot be called more than once per file.');
}
alreadyCalled = true;
//Use the real variables from node
//Use module.exports for exports, since
//the exports in here is amdefine exports.
e = module.exports;
m = module;
r = makeRequire(requireFn, e, m, module.id);
}
//If there are dependencies, they are strings, so need
//to convert them to dependency values.
if (deps) {
deps = deps.map(function (depName) {
return r(depName);
});
}
//Call the factory with the right dependencies.
if (typeof factory === 'function') {
result = factory.apply(m.exports, deps);
} else {
result = factory;
}
if (result !== undefined) {
m.exports = result;
if (id) {
loaderCache[id] = m.exports;
}
}
}
stringRequire = function (systemRequire, exports, module, id, relId) {
//Split the ID by a ! so that
var index = id.indexOf('!'),
originalId = id,
prefix, plugin;
if (index === -1) {
id = normalize(id, relId);
//Straight module lookup. If it is one of the special dependencies,
//deal with it, otherwise, delegate to node.
if (id === 'require') {
return makeRequire(systemRequire, exports, module, relId);
} else if (id === 'exports') {
return exports;
} else if (id === 'module') {
return module;
} else if (loaderCache.hasOwnProperty(id)) {
return loaderCache[id];
} else if (defineCache[id]) {
runFactory.apply(null, defineCache[id]);
return loaderCache[id];
} else {
if(systemRequire) {
return systemRequire(originalId);
} else {
throw new Error('No module with ID: ' + id);
}
}
} else {
//There is a plugin in play.
prefix = id.substring(0, index);
id = id.substring(index + 1, id.length);
plugin = stringRequire(systemRequire, exports, module, prefix, relId);
if (plugin.normalize) {
id = plugin.normalize(id, makeNormalize(relId));
} else {
//Normalize the ID normally.
id = normalize(id, relId);
}
if (loaderCache[id]) {
return loaderCache[id];
} else {
plugin.load(id, makeRequire(systemRequire, exports, module, relId), makeLoad(id), {});
return loaderCache[id];
}
}
};
//Create a define function specific to the module asking for amdefine.
function define(id, deps, factory) {
if (Array.isArray(id)) {
factory = deps;
deps = id;
id = undefined;
} else if (typeof id !== 'string') {
factory = id;
id = deps = undefined;
}
if (deps && !Array.isArray(deps)) {
factory = deps;
deps = undefined;
}
if (!deps) {
deps = ['require', 'exports', 'module'];
}
//Set up properties for this module. If an ID, then use
//internal cache. If no ID, then use the external variables
//for this node module.
if (id) {
//Put the module in deep freeze until there is a
//require call for it.
defineCache[id] = [id, deps, factory];
} else {
runFactory(id, deps, factory);
}
}
//define.require, which has access to all the values in the
//cache. Useful for AMD modules that all have IDs in the file,
//but need to finally export a value to node based on one of those
//IDs.
define.require = function (id) {
if (loaderCache[id]) {
return loaderCache[id];
}
if (defineCache[id]) {
runFactory.apply(null, defineCache[id]);
return loaderCache[id];
}
};
define.amd = {};
return define;
}
module.exports = amdefine;

36
node_modules/amdefine/intercept.js generated vendored Normal file
View file

@ -0,0 +1,36 @@
/*jshint node: true */
var inserted,
Module = require('module'),
fs = require('fs'),
existingExtFn = Module._extensions['.js'],
amdefineRegExp = /amdefine\.js/;
inserted = "if (typeof define !== 'function') {var define = require('amdefine')(module)}";
//From the node/lib/module.js source:
function stripBOM(content) {
// Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
// because the buffer-to-string conversion in `fs.readFileSync()`
// translates it to FEFF, the UTF-16 BOM.
if (content.charCodeAt(0) === 0xFEFF) {
content = content.slice(1);
}
return content;
}
//Also adapted from the node/lib/module.js source:
function intercept(module, filename) {
var content = stripBOM(fs.readFileSync(filename, 'utf8'));
if (!amdefineRegExp.test(module.id)) {
content = inserted + content;
}
module._compile(content, filename);
}
intercept._id = 'amdefine/intercept';
if (!existingExtFn._id || existingExtFn._id !== intercept._id) {
Module._extensions['.js'] = intercept;
}

73
node_modules/amdefine/package.json generated vendored Normal file
View file

@ -0,0 +1,73 @@
{
"_args": [
[
"amdefine@>=0.0.4",
"/Users/okennedy/Desktop/Website/node_modules/handlebars/node_modules/source-map"
]
],
"_from": "amdefine@>=0.0.4",
"_id": "amdefine@1.0.0",
"_inCache": true,
"_installable": true,
"_location": "/amdefine",
"_nodeVersion": "0.10.36",
"_npmUser": {
"email": "jrburke@gmail.com",
"name": "jrburke"
},
"_npmVersion": "2.12.1",
"_phantomChildren": {},
"_requested": {
"name": "amdefine",
"raw": "amdefine@>=0.0.4",
"rawSpec": ">=0.0.4",
"scope": null,
"spec": ">=0.0.4",
"type": "range"
},
"_requiredBy": [
"/handlebars/source-map"
],
"_resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.0.tgz",
"_shasum": "fd17474700cb5cc9c2b709f0be9d23ce3c198c33",
"_shrinkwrap": null,
"_spec": "amdefine@>=0.0.4",
"_where": "/Users/okennedy/Desktop/Website/node_modules/handlebars/node_modules/source-map",
"author": {
"email": "jrburke@gmail.com",
"name": "James Burke",
"url": "http://github.com/jrburke"
},
"bugs": {
"url": "https://github.com/jrburke/amdefine/issues"
},
"dependencies": {},
"description": "Provide AMD's define() API for declaring modules in the AMD format",
"devDependencies": {},
"directories": {},
"dist": {
"shasum": "fd17474700cb5cc9c2b709f0be9d23ce3c198c33",
"tarball": "http://registry.npmjs.org/amdefine/-/amdefine-1.0.0.tgz"
},
"engines": {
"node": ">=0.4.2"
},
"gitHead": "578bc4a3f7dede33f3f3e10edde0c1607005d761",
"homepage": "http://github.com/jrburke/amdefine",
"license": "BSD-3-Clause AND MIT",
"main": "./amdefine.js",
"maintainers": [
{
"name": "jrburke",
"email": "jrburke@gmail.com"
}
],
"name": "amdefine",
"optionalDependencies": {},
"repository": {
"type": "git",
"url": "git+https://github.com/jrburke/amdefine.git"
},
"scripts": {},
"version": "1.0.0"
}

21
node_modules/ansi-red/LICENSE generated vendored Normal file
View file

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) <%= year() %>, Jon Schlinkert.
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.

14
node_modules/ansi-red/index.js generated vendored Normal file
View file

@ -0,0 +1,14 @@
/*!
* ansi-red <https://github.com/jonschlinkert/ansi-red>
*
* Copyright (c) 2015, Jon Schlinkert.
* Licensed under the MIT License.
*/
'use strict';
var wrap = require('ansi-wrap');
module.exports = function red(message) {
return wrap(31, 39, message);
};

107
node_modules/ansi-red/package.json generated vendored Normal file
View file

@ -0,0 +1,107 @@
{
"_args": [
[
"ansi-red@^0.1.1",
"/Users/okennedy/Desktop/Website/node_modules/gray-matter"
]
],
"_from": "ansi-red@>=0.1.1 <0.2.0",
"_id": "ansi-red@0.1.1",
"_inCache": true,
"_installable": true,
"_location": "/ansi-red",
"_nodeVersion": "0.12.0",
"_npmUser": {
"email": "github@sellside.com",
"name": "jonschlinkert"
},
"_npmVersion": "2.10.0",
"_phantomChildren": {},
"_requested": {
"name": "ansi-red",
"raw": "ansi-red@^0.1.1",
"rawSpec": "^0.1.1",
"scope": null,
"spec": ">=0.1.1 <0.2.0",
"type": "range"
},
"_requiredBy": [
"/gray-matter"
],
"_resolved": "https://registry.npmjs.org/ansi-red/-/ansi-red-0.1.1.tgz",
"_shasum": "8c638f9d1080800a353c9c28c8a81ca4705d946c",
"_shrinkwrap": null,
"_spec": "ansi-red@^0.1.1",
"_where": "/Users/okennedy/Desktop/Website/node_modules/gray-matter",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
},
"bugs": {
"url": "https://github.com/jonschlinkert/ansi-red/issues"
},
"dependencies": {
"ansi-wrap": "0.1.0"
},
"description": "The color red, in ansi.",
"devDependencies": {
"mocha": "*"
},
"directories": {},
"dist": {
"shasum": "8c638f9d1080800a353c9c28c8a81ca4705d946c",
"tarball": "http://registry.npmjs.org/ansi-red/-/ansi-red-0.1.1.tgz"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"homepage": "https://github.com/jonschlinkert/ansi-red",
"keywords": [
"256",
"ansi",
"cli",
"color",
"colors",
"colour",
"command",
"command-line",
"console",
"format",
"formatting",
"iterm",
"log",
"logging",
"red",
"rgb",
"shell",
"string",
"style",
"styles",
"styling",
"terminal",
"text",
"tty",
"xterm"
],
"license": "MIT",
"main": "index.js",
"maintainers": [
{
"name": "jonschlinkert",
"email": "github@sellside.com"
}
],
"name": "ansi-red",
"optionalDependencies": {},
"repository": {
"type": "git",
"url": "git+https://github.com/jonschlinkert/ansi-red.git"
},
"scripts": {
"test": "mocha"
},
"version": "0.1.1"
}

74
node_modules/ansi-red/readme.md generated vendored Normal file
View file

@ -0,0 +1,74 @@
# ansi-red [![NPM version](https://badge.fury.io/js/ansi-red.svg)](http://badge.fury.io/js/ansi-red)
> The color red, in ansi.
## Install
Install with [npm](https://www.npmjs.com/)
```sh
$ npm i ansi-red --save
```
## Usage
```js
var red = require('ansi-red');
```
## Related projects
* [ansi-reset](https://github.com/jonschlinkert/ansi-reset)
* [ansi-bold](https://github.com/jonschlinkert/ansi-bold)
* [ansi-dim](https://github.com/jonschlinkert/ansi-dim)
* [ansi-italic](https://github.com/jonschlinkert/ansi-italic)
* [ansi-underline](https://github.com/jonschlinkert/ansi-underline)
* [ansi-inverse](https://github.com/jonschlinkert/ansi-inverse)
* [ansi-hidden](https://github.com/jonschlinkert/ansi-hidden)
* [ansi-strikethrough](https://github.com/jonschlinkert/ansi-strikethrough)
* [ansi-black](https://github.com/jonschlinkert/ansi-black)
* [ansi-red](https://github.com/jonschlinkert/ansi-red)
* [ansi-green](https://github.com/jonschlinkert/ansi-green)
* [ansi-yellow](https://github.com/jonschlinkert/ansi-yellow)
* [ansi-blue](https://github.com/jonschlinkert/ansi-blue)
* [ansi-magenta](https://github.com/jonschlinkert/ansi-magenta)
* [ansi-cyan](https://github.com/jonschlinkert/ansi-cyan)
* [ansi-white](https://github.com/jonschlinkert/ansi-white)
* [ansi-gray](https://github.com/jonschlinkert/ansi-gray)
* [ansi-grey](https://github.com/jonschlinkert/ansi-grey)
* [ansi-bgblack](https://github.com/jonschlinkert/ansi-bgblack)
* [ansi-bgred](https://github.com/jonschlinkert/ansi-bgred)
* [ansi-bggreen](https://github.com/jonschlinkert/ansi-bggreen)
* [ansi-bgyellow](https://github.com/jonschlinkert/ansi-bgyellow)
* [ansi-bgblue](https://github.com/jonschlinkert/ansi-bgblue)
* [ansi-bgmagenta](https://github.com/jonschlinkert/ansi-bgmagenta)
* [ansi-bgcyan](https://github.com/jonschlinkert/ansi-bgcyan)
* [ansi-bgwhite](https://github.com/jonschlinkert/ansi-bgwhite)
## Running tests
Install dev dependencies:
```sh
$ npm i -d && npm test
```
## Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/ansi-red/issues/new)
## Author
**Jon Schlinkert**
+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
## License
Copyright © 2015 Jon Schlinkert
Released under the MIT license.
***
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on May 21, 2015._

4
node_modules/ansi-regex/index.js generated vendored Normal file
View file

@ -0,0 +1,4 @@
'use strict';
module.exports = function () {
return /\u001b\[(?:[0-9]{1,3}(?:;[0-9]{1,3})*)?[m|K]/g;
};

105
node_modules/ansi-regex/package.json generated vendored Normal file
View file

@ -0,0 +1,105 @@
{
"_args": [
[
"ansi-regex@^0.2.0",
"/Users/okennedy/Desktop/Website/node_modules/has-ansi"
]
],
"_from": "ansi-regex@>=0.2.0 <0.3.0",
"_id": "ansi-regex@0.2.1",
"_inCache": true,
"_installable": true,
"_location": "/ansi-regex",
"_npmUser": {
"email": "sindresorhus@gmail.com",
"name": "sindresorhus"
},
"_npmVersion": "1.4.9",
"_phantomChildren": {},
"_requested": {
"name": "ansi-regex",
"raw": "ansi-regex@^0.2.0",
"rawSpec": "^0.2.0",
"scope": null,
"spec": ">=0.2.0 <0.3.0",
"type": "range"
},
"_requiredBy": [
"/has-ansi",
"/strip-ansi"
],
"_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz",
"_shasum": "0d8e946967a3d8143f93e24e298525fc1b2235f9",
"_shrinkwrap": null,
"_spec": "ansi-regex@^0.2.0",
"_where": "/Users/okennedy/Desktop/Website/node_modules/has-ansi",
"author": {
"email": "sindresorhus@gmail.com",
"name": "Sindre Sorhus",
"url": "http://sindresorhus.com"
},
"bugs": {
"url": "https://github.com/sindresorhus/ansi-regex/issues"
},
"dependencies": {},
"description": "Regular expression for matching ANSI escape codes",
"devDependencies": {
"mocha": "*"
},
"directories": {},
"dist": {
"shasum": "0d8e946967a3d8143f93e24e298525fc1b2235f9",
"tarball": "http://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"homepage": "https://github.com/sindresorhus/ansi-regex",
"keywords": [
"256",
"ansi",
"cli",
"color",
"colors",
"colour",
"command-line",
"console",
"escape",
"find",
"formatting",
"match",
"pattern",
"re",
"regex",
"regexp",
"rgb",
"shell",
"string",
"styles",
"terminal",
"test",
"text",
"tty",
"xterm"
],
"license": "MIT",
"maintainers": [
{
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
}
],
"name": "ansi-regex",
"optionalDependencies": {},
"repository": {
"type": "git",
"url": "git://github.com/sindresorhus/ansi-regex"
},
"scripts": {
"test": "mocha"
},
"version": "0.2.1"
}

33
node_modules/ansi-regex/readme.md generated vendored Normal file
View file

@ -0,0 +1,33 @@
# ansi-regex [![Build Status](https://travis-ci.org/sindresorhus/ansi-regex.svg?branch=master)](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)

40
node_modules/ansi-styles/index.js generated vendored Normal file
View file

@ -0,0 +1,40 @@
'use strict';
var styles = module.exports;
var codes = {
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],
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 = '\u001b[' + val[0] + 'm';
style.close = '\u001b[' + val[1] + 'm';
});

99
node_modules/ansi-styles/package.json generated vendored Normal file
View file

@ -0,0 +1,99 @@
{
"_args": [
[
"ansi-styles@^1.1.0",
"/Users/okennedy/Desktop/Website/node_modules/chalk"
]
],
"_from": "ansi-styles@>=1.1.0 <2.0.0",
"_id": "ansi-styles@1.1.0",
"_inCache": true,
"_installable": true,
"_location": "/ansi-styles",
"_npmUser": {
"email": "sindresorhus@gmail.com",
"name": "sindresorhus"
},
"_npmVersion": "1.4.9",
"_phantomChildren": {},
"_requested": {
"name": "ansi-styles",
"raw": "ansi-styles@^1.1.0",
"rawSpec": "^1.1.0",
"scope": null,
"spec": ">=1.1.0 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/chalk"
],
"_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.1.0.tgz",
"_shasum": "eaecbf66cd706882760b2f4691582b8f55d7a7de",
"_shrinkwrap": null,
"_spec": "ansi-styles@^1.1.0",
"_where": "/Users/okennedy/Desktop/Website/node_modules/chalk",
"author": {
"email": "sindresorhus@gmail.com",
"name": "Sindre Sorhus",
"url": "http://sindresorhus.com"
},
"bugs": {
"url": "https://github.com/sindresorhus/ansi-styles/issues"
},
"dependencies": {},
"description": "ANSI escape codes for styling strings in the terminal",
"devDependencies": {
"mocha": "*"
},
"directories": {},
"dist": {
"shasum": "eaecbf66cd706882760b2f4691582b8f55d7a7de",
"tarball": "http://registry.npmjs.org/ansi-styles/-/ansi-styles-1.1.0.tgz"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"homepage": "https://github.com/sindresorhus/ansi-styles",
"keywords": [
"256",
"ansi",
"cli",
"color",
"colors",
"colour",
"command-line",
"console",
"escape",
"formatting",
"log",
"logging",
"rgb",
"shell",
"string",
"styles",
"terminal",
"text",
"tty",
"xterm"
],
"license": "MIT",
"maintainers": [
{
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
}
],
"name": "ansi-styles",
"optionalDependencies": {},
"repository": {
"type": "git",
"url": "git://github.com/sindresorhus/ansi-styles"
},
"scripts": {
"test": "mocha"
},
"version": "1.1.0"
}

70
node_modules/ansi-styles/readme.md generated vendored Normal file
View file

@ -0,0 +1,70 @@
# ansi-styles [![Build Status](https://travis-ci.org/sindresorhus/ansi-styles.svg?branch=master)](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.
![screenshot](screenshot.png)
## 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
### General
- `reset`
- `bold`
- `dim`
- `italic` *(not widely supported)*
- `underline`
- `inverse`
- `hidden`
- `strikethrough` *(not widely supported)*
### 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)

21
node_modules/ansi-wrap/LICENSE generated vendored Normal file
View file

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015, Jon Schlinkert.
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.

89
node_modules/ansi-wrap/README.md generated vendored Normal file
View file

@ -0,0 +1,89 @@
# ansi-wrap [![NPM version](https://badge.fury.io/js/ansi-wrap.svg)](http://badge.fury.io/js/ansi-wrap)
> Create ansi colors by passing the open and close codes.
## Install
Install with [npm](https://www.npmjs.com/)
```sh
$ npm i ansi-wrap --save
```
## Usage
```js
var wrap = require('ansi-wrap');
```
**Example**
Pass codes for [ansi magenta background](https://github.com/jonschlinkert/ansi-bgmagenta):
```js
console.log(wrap(45, 49, 'This is a message...'));
//=> '\u001b[45mfoo\u001b[49m'
```
Which prints out...
[![screen shot 2015-05-21 at 8 28 32 pm](https://cloud.githubusercontent.com/assets/383994/7761769/12488afa-fff8-11e4-9cc1-71a8a6ec14a4.png)](https://www.npmjs.com/)
## Related projects
This is used in these projects:
* [ansi-reset](https://github.com/jonschlinkert/ansi-reset)
* [ansi-bold](https://github.com/jonschlinkert/ansi-bold)
* [ansi-dim](https://github.com/jonschlinkert/ansi-dim)
* [ansi-italic](https://github.com/jonschlinkert/ansi-italic)
* [ansi-underline](https://github.com/jonschlinkert/ansi-underline)
* [ansi-inverse](https://github.com/jonschlinkert/ansi-inverse)
* [ansi-hidden](https://github.com/jonschlinkert/ansi-hidden)
* [ansi-strikethrough](https://github.com/jonschlinkert/ansi-strikethrough)
* [ansi-black](https://github.com/jonschlinkert/ansi-black)
* [ansi-red](https://github.com/jonschlinkert/ansi-red)
* [ansi-green](https://github.com/jonschlinkert/ansi-green)
* [ansi-yellow](https://github.com/jonschlinkert/ansi-yellow)
* [ansi-blue](https://github.com/jonschlinkert/ansi-blue)
* [ansi-magenta](https://github.com/jonschlinkert/ansi-magenta)
* [ansi-cyan](https://github.com/jonschlinkert/ansi-cyan)
* [ansi-white](https://github.com/jonschlinkert/ansi-white)
* [ansi-gray](https://github.com/jonschlinkert/ansi-gray)
* [ansi-grey](https://github.com/jonschlinkert/ansi-grey)
* [ansi-bgblack](https://github.com/jonschlinkert/ansi-bgblack)
* [ansi-bgred](https://github.com/jonschlinkert/ansi-bgred)
* [ansi-bggreen](https://github.com/jonschlinkert/ansi-bggreen)
* [ansi-bgyellow](https://github.com/jonschlinkert/ansi-bgyellow)
* [ansi-bgblue](https://github.com/jonschlinkert/ansi-bgblue)
* [ansi-bgmagenta](https://github.com/jonschlinkert/ansi-bgmagenta)
* [ansi-bgcyan](https://github.com/jonschlinkert/ansi-bgcyan)
* [ansi-bgwhite](https://github.com/jonschlinkert/ansi-bgwhite)
## Running tests
Install dev dependencies:
```sh
$ npm i -d && npm test
```
## Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/ansi-wrap/issues/new)
## Author
**Jon Schlinkert**
+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
## License
Copyright © 2015 Jon Schlinkert
Released under the MIT license.
***
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on May 21, 2015._

5
node_modules/ansi-wrap/index.js generated vendored Normal file
View file

@ -0,0 +1,5 @@
'use strict';
module.exports = function(a, b, msg) {
return '\u001b['+ a + 'm' + msg + '\u001b[' + b + 'm';
};

80
node_modules/ansi-wrap/package.json generated vendored Normal file
View file

@ -0,0 +1,80 @@
{
"_args": [
[
"ansi-wrap@0.1.0",
"/Users/okennedy/Desktop/Website/node_modules/ansi-red"
]
],
"_from": "ansi-wrap@0.1.0",
"_id": "ansi-wrap@0.1.0",
"_inCache": true,
"_installable": true,
"_location": "/ansi-wrap",
"_nodeVersion": "0.12.0",
"_npmUser": {
"email": "github@sellside.com",
"name": "jonschlinkert"
},
"_npmVersion": "2.5.1",
"_phantomChildren": {},
"_requested": {
"name": "ansi-wrap",
"raw": "ansi-wrap@0.1.0",
"rawSpec": "0.1.0",
"scope": null,
"spec": "0.1.0",
"type": "version"
},
"_requiredBy": [
"/ansi-red"
],
"_resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz",
"_shasum": "a82250ddb0015e9a27ca82e82ea603bbfa45efaf",
"_shrinkwrap": null,
"_spec": "ansi-wrap@0.1.0",
"_where": "/Users/okennedy/Desktop/Website/node_modules/ansi-red",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
},
"bugs": {
"url": "https://github.com/jonschlinkert/ansi-wrap/issues"
},
"dependencies": {},
"description": "Create ansi colors by passing the open and close codes.",
"devDependencies": {},
"directories": {},
"dist": {
"shasum": "a82250ddb0015e9a27ca82e82ea603bbfa45efaf",
"tarball": "http://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"homepage": "https://github.com/jonschlinkert/ansi-wrap",
"keywords": [],
"license": {
"type": "MIT",
"url": "https://github.com/jonschlinkert/ansi-wrap/blob/master/LICENSE"
},
"main": "index.js",
"maintainers": [
{
"name": "jonschlinkert",
"email": "github@sellside.com"
}
],
"name": "ansi-wrap",
"optionalDependencies": {},
"repository": {
"type": "git",
"url": "https://github.com/jonschlinkert/ansi-wrap.git"
},
"scripts": {
"test": "mocha"
},
"version": "0.1.0"
}

142
node_modules/argparse/CHANGELOG.md generated vendored Normal file
View file

@ -0,0 +1,142 @@
1.0.3 / 2015-10-27
------------------
* Fix parse `=` in args: `--examplepath="C:\myfolder\env=x64"`. #84, @CatWithApple.
1.0.2 / 2015-03-22
------------------
* Relaxed lodash version dependency.
1.0.1 / 2015-02-20
------------------
* Changed dependencies to be compatible with ancient nodejs.
1.0.0 / 2015-02-19
------------------
* Maintenance release.
* Replaced `underscore` with `lodash`.
* Bumped version to 1.0.0 to better reflect semver meaning.
* HISTORY.md -> CHANGELOG.md
0.1.16 / 2013-12-01
-------------------
* Maintenance release. Updated dependencies and docs.
0.1.15 / 2013-05-13
-------------------
* Fixed #55, @trebor89
0.1.14 / 2013-05-12
-------------------
* Fixed #62, @maxtaco
0.1.13 / 2013-04-08
-------------------
* Added `.npmignore` to reduce package size
0.1.12 / 2013-02-10
-------------------
* Fixed conflictHandler (#46), @hpaulj
0.1.11 / 2013-02-07
-------------------
* Multiple bugfixes, @hpaulj
* Added 70+ tests (ported from python), @hpaulj
* Added conflictHandler, @applepicke
* Added fromfilePrefixChar, @hpaulj
0.1.10 / 2012-12-30
-------------------
* Added [mutual exclusion](http://docs.python.org/dev/library/argparse.html#mutual-exclusion)
support, thanks to @hpaulj
* Fixed options check for `storeConst` & `appendConst` actions, thanks to @hpaulj
0.1.9 / 2012-12-27
------------------
* Fixed option dest interferens with other options (issue #23), thanks to @hpaulj
* Fixed default value behavior with `*` positionals, thanks to @hpaulj
* Improve `getDefault()` behavior, thanks to @hpaulj
* Imrove negative argument parsing, thanks to @hpaulj
0.1.8 / 2012-12-01
------------------
* Fixed parser parents (issue #19), thanks to @hpaulj
* Fixed negative argument parse (issue #20), thanks to @hpaulj
0.1.7 / 2012-10-14
------------------
* Fixed 'choices' argument parse (issue #16)
* Fixed stderr output (issue #15)
0.1.6 / 2012-09-09
------------------
* Fixed check for conflict of options (thanks to @tomxtobin)
0.1.5 / 2012-09-03
------------------
* Fix parser #setDefaults method (thanks to @tomxtobin)
0.1.4 / 2012-07-30
------------------
* Fixed pseudo-argument support (thanks to @CGamesPlay)
* Fixed addHelp default (should be true), if not set (thanks to @benblank)
0.1.3 / 2012-06-27
------------------
* Fixed formatter api name: Formatter -> HelpFormatter
0.1.2 / 2012-05-29
------------------
* Added basic tests
* Removed excess whitespace in help
* Fixed error reporting, when parcer with subcommands
called with empty arguments
0.1.1 / 2012-05-23
------------------
* Fixed line wrapping in help formatter
* Added better error reporting on invalid arguments
0.1.0 / 2012-05-16
------------------
* First release.

21
node_modules/argparse/LICENSE generated vendored Normal file
View file

@ -0,0 +1,21 @@
(The MIT License)
Copyright (C) 2012 by Vitaly Puzrin
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.

243
node_modules/argparse/README.md generated vendored Normal file
View file

@ -0,0 +1,243 @@
argparse
========
[![Build Status](https://secure.travis-ci.org/nodeca/argparse.png?branch=master)](http://travis-ci.org/nodeca/argparse)
[![NPM version](https://img.shields.io/npm/v/argparse.svg)](https://www.npmjs.org/package/argparse)
CLI arguments parser for node.js. Javascript port of python's
[argparse](http://docs.python.org/dev/library/argparse.html) module
(original version 3.2). That's a full port, except some very rare options,
recorded in issue tracker.
**NB. Difference with original.**
- Method names changed to camelCase. See [generated docs](http://nodeca.github.com/argparse/).
- Use `defaultValue` instead of `default`.
Example
=======
test.js file:
```javascript
#!/usr/bin/env node
'use strict';
var ArgumentParser = require('../lib/argparse').ArgumentParser;
var parser = new ArgumentParser({
version: '0.0.1',
addHelp:true,
description: 'Argparse example'
});
parser.addArgument(
[ '-f', '--foo' ],
{
help: 'foo bar'
}
);
parser.addArgument(
[ '-b', '--bar' ],
{
help: 'bar foo'
}
);
var args = parser.parseArgs();
console.dir(args);
```
Display help:
```
$ ./test.js -h
usage: example.js [-h] [-v] [-f FOO] [-b BAR]
Argparse example
Optional arguments:
-h, --help Show this help message and exit.
-v, --version Show program's version number and exit.
-f FOO, --foo FOO foo bar
-b BAR, --bar BAR bar foo
```
Parse arguments:
```
$ ./test.js -f=3 --bar=4
{ foo: '3', bar: '4' }
```
More [examples](https://github.com/nodeca/argparse/tree/master/examples).
ArgumentParser objects
======================
```
new ArgumentParser({paramters hash});
```
Creates a new ArgumentParser object.
**Supported params:**
- ```description``` - Text to display before the argument help.
- ```epilog``` - Text to display after the argument help.
- ```addHelp``` - Add a -h/help option to the parser. (default: true)
- ```argumentDefault``` - Set the global default value for arguments. (default: null)
- ```parents``` - A list of ArgumentParser objects whose arguments should also be included.
- ```prefixChars``` - The set of characters that prefix optional arguments. (default: -)
- ```formatterClass``` - A class for customizing the help output.
- ```prog``` - The name of the program (default: `path.basename(process.argv[1])`)
- ```usage``` - The string describing the program usage (default: generated)
- ```conflictHandler``` - Usually unnecessary, defines strategy for resolving conflicting optionals.
**Not supportied yet**
- ```fromfilePrefixChars``` - The set of characters that prefix files from which additional arguments should be read.
Details in [original ArgumentParser guide](http://docs.python.org/dev/library/argparse.html#argumentparser-objects)
addArgument() method
====================
```
ArgumentParser.addArgument([names or flags], {options})
```
Defines how a single command-line argument should be parsed.
- ```name or flags``` - Either a name or a list of option strings, e.g. foo or -f, --foo.
Options:
- ```action``` - The basic type of action to be taken when this argument is encountered at the command line.
- ```nargs```- The number of command-line arguments that should be consumed.
- ```constant``` - A constant value required by some action and nargs selections.
- ```defaultValue``` - The value produced if the argument is absent from the command line.
- ```type``` - The type to which the command-line argument should be converted.
- ```choices``` - A container of the allowable values for the argument.
- ```required``` - Whether or not the command-line option may be omitted (optionals only).
- ```help``` - A brief description of what the argument does.
- ```metavar``` - A name for the argument in usage messages.
- ```dest``` - The name of the attribute to be added to the object returned by parseArgs().
Details in [original add_argument guide](http://docs.python.org/dev/library/argparse.html#the-add-argument-method)
Action (some details)
================
ArgumentParser objects associate command-line arguments with actions.
These actions can do just about anything with the command-line arguments associated
with them, though most actions simply add an attribute to the object returned by
parseArgs(). The action keyword argument specifies how the command-line arguments
should be handled. The supported actions are:
- ```store``` - Just stores the arguments value. This is the default action.
- ```storeConst``` - Stores value, specified by the const keyword argument.
(Note that the const keyword argument defaults to the rather unhelpful None.)
The 'storeConst' action is most commonly used with optional arguments, that
specify some sort of flag.
- ```storeTrue``` and ```storeFalse``` - Stores values True and False
respectively. These are special cases of 'storeConst'.
- ```append``` - Stores a list, and appends each argument value to the list.
This is useful to allow an option to be specified multiple times.
- ```appendConst``` - Stores a list, and appends value, specified by the
const keyword argument to the list. (Note, that the const keyword argument defaults
is None.) The 'appendConst' action is typically used when multiple arguments need
to store constants to the same list.
- ```count``` - Counts the number of times a keyword argument occurs. For example,
used for increasing verbosity levels.
- ```help``` - Prints a complete help message for all the options in the current
parser and then exits. By default a help action is automatically added to the parser.
See ArgumentParser for details of how the output is created.
- ```version``` - Prints version information and exit. Expects a `version=`
keyword argument in the addArgument() call.
Details in [original action guide](http://docs.python.org/dev/library/argparse.html#action)
Sub-commands
============
ArgumentParser.addSubparsers()
Many programs split their functionality into a number of sub-commands, for
example, the svn program can invoke sub-commands like `svn checkout`, `svn update`,
and `svn commit`. Splitting up functionality this way can be a particularly good
idea when a program performs several different functions which require different
kinds of command-line arguments. `ArgumentParser` supports creation of such
sub-commands with `addSubparsers()` method. The `addSubparsers()` method is
normally called with no arguments and returns an special action object.
This object has a single method `addParser()`, which takes a command name and
any `ArgumentParser` constructor arguments, and returns an `ArgumentParser` object
that can be modified as usual.
Example:
sub_commands.js
```javascript
#!/usr/bin/env node
'use strict';
var ArgumentParser = require('../lib/argparse').ArgumentParser;
var parser = new ArgumentParser({
version: '0.0.1',
addHelp:true,
description: 'Argparse examples: sub-commands',
});
var subparsers = parser.addSubparsers({
title:'subcommands',
dest:"subcommand_name"
});
var bar = subparsers.addParser('c1', {addHelp:true});
bar.addArgument(
[ '-f', '--foo' ],
{
action: 'store',
help: 'foo3 bar3'
}
);
var bar = subparsers.addParser(
'c2',
{aliases:['co'], addHelp:true}
);
bar.addArgument(
[ '-b', '--bar' ],
{
action: 'store',
type: 'int',
help: 'foo3 bar3'
}
);
var args = parser.parseArgs();
console.dir(args);
```
Details in [original sub-commands guide](http://docs.python.org/dev/library/argparse.html#sub-commands)
Contributors
============
- [Eugene Shkuropat](https://github.com/shkuropat)
- [Paul Jacobson](https://github.com/hpaulj)
[others](https://github.com/nodeca/argparse/graphs/contributors)
License
=======
Copyright (c) 2012 [Vitaly Puzrin](https://github.com/puzrin).
Released under the MIT license. See
[LICENSE](https://github.com/nodeca/argparse/blob/master/LICENSE) for details.

36
node_modules/argparse/examples/arguments.js generated vendored Executable file
View file

@ -0,0 +1,36 @@
#!/usr/bin/env node
'use strict';
var ArgumentParser = require('../lib/argparse').ArgumentParser;
var parser = new ArgumentParser({
version: '0.0.1',
addHelp: true,
description: 'Argparse examples: arguments'
});
parser.addArgument(
[ '-f', '--foo' ],
{
help: 'foo bar'
}
);
parser.addArgument(
[ '-b', '--bar' ],
{
help: 'bar foo'
}
);
parser.printHelp();
console.log('-----------');
var args;
args = parser.parseArgs('-f 1 -b2'.split(' '));
console.dir(args);
console.log('-----------');
args = parser.parseArgs('-f=3 --bar=4'.split(' '));
console.dir(args);
console.log('-----------');
args = parser.parseArgs('--foo 5 --bar 6'.split(' '));
console.dir(args);
console.log('-----------');

22
node_modules/argparse/examples/choice.js generated vendored Executable file
View file

@ -0,0 +1,22 @@
#!/usr/bin/env node
'use strict';
var ArgumentParser = require('../lib/argparse').ArgumentParser;
var parser = new ArgumentParser({
version: '0.0.1',
addHelp: true,
description: 'Argparse examples: choice'
});
parser.addArgument(['foo'], {choices: 'abc'});
parser.printHelp();
console.log('-----------');
var args;
args = parser.parseArgs(['c']);
console.dir(args);
console.log('-----------');
parser.parseArgs(['X']);
console.dir(args);

59
node_modules/argparse/examples/constants.js generated vendored Executable file
View file

@ -0,0 +1,59 @@
#!/usr/bin/env node
'use strict';
var ArgumentParser = require('../lib/argparse').ArgumentParser;
var parser = new ArgumentParser({
version: '0.0.1',
addHelp: true,
description: 'Argparse examples: constant'
});
parser.addArgument(
[ '-a'],
{
action: 'storeConst',
dest: 'answer',
help: 'store constant',
constant: 42
}
);
parser.addArgument(
[ '--str' ],
{
action: 'appendConst',
dest: 'types',
help: 'append constant "str" to types',
constant: 'str'
}
);
parser.addArgument(
[ '--int' ],
{
action: 'appendConst',
dest: 'types',
help: 'append constant "int" to types',
constant: 'int'
}
);
parser.addArgument(
[ '--true' ],
{
action: 'storeTrue',
help: 'store true constant'
}
);
parser.addArgument(
[ '--false' ],
{
action: 'storeFalse',
help: 'store false constant'
}
);
parser.printHelp();
console.log('-----------');
var args;
args = parser.parseArgs('-a --str --int --true'.split(' '));
console.dir(args);

13
node_modules/argparse/examples/help.js generated vendored Executable file
View file

@ -0,0 +1,13 @@
#!/usr/bin/env node
'use strict';
var ArgumentParser = require('../lib/argparse').ArgumentParser;
var parser = new ArgumentParser({
version: '0.0.1',
addHelp: true,
description: 'Argparse examples: help',
epilog: 'help epilog',
prog: 'help_example_prog',
usage: 'Usage %(prog)s <agrs>'
});
parser.printHelp();

33
node_modules/argparse/examples/nargs.js generated vendored Executable file
View file

@ -0,0 +1,33 @@
#!/usr/bin/env node
'use strict';
var ArgumentParser = require('../lib/argparse').ArgumentParser;
var parser = new ArgumentParser({
version: '0.0.1',
addHelp: true,
description: 'Argparse examples: nargs'
});
parser.addArgument(
[ '-f', '--foo' ],
{
help: 'foo bar',
nargs: 1
}
);
parser.addArgument(
[ '-b', '--bar' ],
{
help: 'bar foo',
nargs: '*'
}
);
parser.printHelp();
console.log('-----------');
var args;
args = parser.parseArgs('--foo a --bar c d'.split(' '));
console.dir(args);
console.log('-----------');
args = parser.parseArgs('--bar b c f --foo a'.split(' '));
console.dir(args);

28
node_modules/argparse/examples/parents.js generated vendored Executable file
View file

@ -0,0 +1,28 @@
#!/usr/bin/env node
'use strict';
var ArgumentParser = require('../lib/argparse').ArgumentParser;
var args;
var parent_parser = new ArgumentParser({ addHelp: false });
// note addHelp:false to prevent duplication of the -h option
parent_parser.addArgument(
['--parent'],
{ type: 'int', description: 'parent' }
);
var foo_parser = new ArgumentParser({
parents: [ parent_parser ],
description: 'child1'
});
foo_parser.addArgument(['foo']);
args = foo_parser.parseArgs(['--parent', '2', 'XXX']);
console.log(args);
var bar_parser = new ArgumentParser({
parents: [ parent_parser ],
description: 'child2'
});
bar_parser.addArgument(['--bar']);
args = bar_parser.parseArgs(['--bar', 'YYY']);
console.log(args);

23
node_modules/argparse/examples/prefix_chars.js generated vendored Executable file
View file

@ -0,0 +1,23 @@
#!/usr/bin/env node
'use strict';
var ArgumentParser = require('../lib/argparse').ArgumentParser;
var parser = new ArgumentParser({
version: '0.0.1',
addHelp: true,
description: 'Argparse examples: prefix_chars',
prefixChars: '-+'
});
parser.addArgument(['+f', '++foo']);
parser.addArgument(['++bar'], {action: 'storeTrue'});
parser.printHelp();
console.log('-----------');
var args;
args = parser.parseArgs(['+f', '1']);
console.dir(args);
args = parser.parseArgs(['++bar']);
console.dir(args);
args = parser.parseArgs(['++foo', '2', '++bar']);
console.dir(args);

49
node_modules/argparse/examples/sub_commands.js generated vendored Executable file
View file

@ -0,0 +1,49 @@
#!/usr/bin/env node
'use strict';
var ArgumentParser = require('../lib/argparse').ArgumentParser;
var parser = new ArgumentParser({
version: '0.0.1',
addHelp: true,
description: 'Argparse examples: sub-commands'
});
var subparsers = parser.addSubparsers({
title: 'subcommands',
dest: "subcommand_name"
});
var bar = subparsers.addParser('c1', {addHelp: true, help: 'c1 help'});
bar.addArgument(
[ '-f', '--foo' ],
{
action: 'store',
help: 'foo3 bar3'
}
);
var bar = subparsers.addParser(
'c2',
{aliases: ['co'], addHelp: true, help: 'c2 help'}
);
bar.addArgument(
[ '-b', '--bar' ],
{
action: 'store',
type: 'int',
help: 'foo3 bar3'
}
);
parser.printHelp();
console.log('-----------');
var args;
args = parser.parseArgs('c1 -f 2'.split(' '));
console.dir(args);
console.log('-----------');
args = parser.parseArgs('c2 -b 1'.split(' '));
console.dir(args);
console.log('-----------');
args = parser.parseArgs('co -b 1'.split(' '));
console.dir(args);
console.log('-----------');
parser.parseArgs(['c1', '-h']);

35
node_modules/argparse/examples/sum.js generated vendored Executable file
View file

@ -0,0 +1,35 @@
#!/usr/bin/env node
'use strict';
var ArgumentParser = require('../lib/argparse').ArgumentParser;
var parser = new ArgumentParser({ description: 'Process some integers.' });
function sum(arr) {
return arr.reduce(function (a, b) {
return a + b;
}, 0);
}
function max(arr) {
return Math.max.apply(Math, arr);
}
parser.addArgument(['integers'], {
metavar: 'N',
type: 'int',
nargs: '+',
help: 'an integer for the accumulator'
});
parser.addArgument(['--sum'], {
dest: 'accumulate',
action: 'storeConst',
constant: sum,
defaultValue: max,
help: 'sum the integers (default: find the max)'
});
var args = parser.parseArgs('--sum 1 2 -1'.split(' '));
console.log(args.accumulate(args.integers));

270
node_modules/argparse/examples/testformatters.js generated vendored Normal file
View file

@ -0,0 +1,270 @@
'use strict';
var a, group, parser, helptext;
var assert = require('assert');
var print = function () {
return console.log.apply(console, arguments);
};
// print = function () {};
var argparse = require('argparse');
print("TEST argparse.ArgumentDefaultsHelpFormatter");
parser = new argparse.ArgumentParser({
debug: true,
formatterClass: argparse.ArgumentDefaultsHelpFormatter,
description: 'description'
});
parser.addArgument(['--foo'], {
help: 'foo help - oh and by the way, %(defaultValue)s'
});
parser.addArgument(['--bar'], {
action: 'storeTrue',
help: 'bar help'
});
parser.addArgument(['spam'], {
help: 'spam help'
});
parser.addArgument(['badger'], {
nargs: '?',
defaultValue: 'wooden',
help: 'badger help'
});
group = parser.addArgumentGroup({
title: 'title',
description: 'group description'
});
group.addArgument(['--baz'], {
type: 'int',
defaultValue: 42,
help: 'baz help'
});
helptext = parser.formatHelp();
print(helptext);
// test selected clips
assert(helptext.match(/badger help \(default: wooden\)/));
assert(helptext.match(/foo help - oh and by the way, null/));
assert(helptext.match(/bar help \(default: false\)/));
assert(helptext.match(/title:\n {2}group description/)); // test indent
assert(helptext.match(/baz help \(default: 42\)/im));
/*
usage: PROG [-h] [--foo FOO] [--bar] [--baz BAZ] spam [badger]
description
positional arguments:
spam spam help
badger badger help (default: wooden)
optional arguments:
-h, --help show this help message and exit
--foo FOO foo help - oh and by the way, null
--bar bar help (default: false)
title:
group description
--baz BAZ baz help (default: 42)
*/
print("TEST argparse.RawDescriptionHelpFormatter");
parser = new argparse.ArgumentParser({
debug: true,
prog: 'PROG',
formatterClass: argparse.RawDescriptionHelpFormatter,
description: 'Keep the formatting\n' +
' exactly as it is written\n' +
'\n' +
'here\n'
});
a = parser.addArgument(['--foo'], {
help: ' foo help should not\n' +
' retain this odd formatting'
});
parser.addArgument(['spam'], {
'help': 'spam help'
});
group = parser.addArgumentGroup({
title: 'title',
description: ' This text\n' +
' should be indented\n' +
' exactly like it is here\n'
});
group.addArgument(['--bar'], {
help: 'bar help'
});
helptext = parser.formatHelp();
print(helptext);
// test selected clips
assert(helptext.match(parser.description));
assert.equal(helptext.match(a.help), null);
assert(helptext.match(/foo help should not retain this odd formatting/));
/*
class TestHelpRawDescription(HelpTestCase):
"""Test the RawTextHelpFormatter"""
....
usage: PROG [-h] [--foo FOO] [--bar BAR] spam
Keep the formatting
exactly as it is written
here
positional arguments:
spam spam help
optional arguments:
-h, --help show this help message and exit
--foo FOO foo help should not retain this odd formatting
title:
This text
should be indented
exactly like it is here
--bar BAR bar help
*/
print("TEST argparse.RawTextHelpFormatter");
parser = new argparse.ArgumentParser({
debug: true,
prog: 'PROG',
formatterClass: argparse.RawTextHelpFormatter,
description: 'Keep the formatting\n' +
' exactly as it is written\n' +
'\n' +
'here\n'
});
parser.addArgument(['--baz'], {
help: ' baz help should also\n' +
'appear as given here'
});
a = parser.addArgument(['--foo'], {
help: ' foo help should also\n' +
'appear as given here'
});
parser.addArgument(['spam'], {
'help': 'spam help'
});
group = parser.addArgumentGroup({
title: 'title',
description: ' This text\n' +
' should be indented\n' +
' exactly like it is here\n'
});
group.addArgument(['--bar'], {
help: 'bar help'
});
helptext = parser.formatHelp();
print(helptext);
// test selected clips
assert(helptext.match(parser.description));
assert(helptext.match(/( {14})appear as given here/gm));
/*
class TestHelpRawText(HelpTestCase):
"""Test the RawTextHelpFormatter"""
usage: PROG [-h] [--foo FOO] [--bar BAR] spam
Keep the formatting
exactly as it is written
here
positional arguments:
spam spam help
optional arguments:
-h, --help show this help message and exit
--foo FOO foo help should also
appear as given here
title:
This text
should be indented
exactly like it is here
--bar BAR bar help
*/
print("TEST metavar as a tuple");
parser = new argparse.ArgumentParser({
prog: 'PROG'
});
parser.addArgument(['-w'], {
help: 'w',
nargs: '+',
metavar: ['W1', 'W2']
});
parser.addArgument(['-x'], {
help: 'x',
nargs: '*',
metavar: ['X1', 'X2']
});
parser.addArgument(['-y'], {
help: 'y',
nargs: 3,
metavar: ['Y1', 'Y2', 'Y3']
});
parser.addArgument(['-z'], {
help: 'z',
nargs: '?',
metavar: ['Z1']
});
helptext = parser.formatHelp();
print(helptext);
var ustring = 'PROG [-h] [-w W1 [W2 ...]] [-x [X1 [X2 ...]]] [-y Y1 Y2 Y3] [-z [Z1]]';
ustring = ustring.replace(/\[/g, '\\[').replace(/\]/g, '\\]');
// print(ustring)
assert(helptext.match(new RegExp(ustring)));
/*
class TestHelpTupleMetavar(HelpTestCase):
"""Test specifying metavar as a tuple"""
usage: PROG [-h] [-w W1 [W2 ...]] [-x [X1 [X2 ...]]] [-y Y1 Y2 Y3] [-z [Z1]]
optional arguments:
-h, --help show this help message and exit
-w W1 [W2 ...] w
-x [X1 [X2 ...]] x
-y Y1 Y2 Y3 y
-z [Z1] z
*/

1
node_modules/argparse/index.js generated vendored Normal file
View file

@ -0,0 +1 @@
module.exports = require('./lib/argparse');

146
node_modules/argparse/lib/action.js generated vendored Normal file
View file

@ -0,0 +1,146 @@
/**
* class Action
*
* Base class for all actions
* Do not call in your code, use this class only for inherits your own action
*
* Information about how to convert command line strings to Javascript objects.
* Action objects are used by an ArgumentParser to represent the information
* needed to parse a single argument from one or more strings from the command
* line. The keyword arguments to the Action constructor are also all attributes
* of Action instances.
*
* #####Alowed keywords:
*
* - `store`
* - `storeConstant`
* - `storeTrue`
* - `storeFalse`
* - `append`
* - `appendConstant`
* - `count`
* - `help`
* - `version`
*
* Information about action options see [[Action.new]]
*
* See also [original guide](http://docs.python.org/dev/library/argparse.html#action)
*
**/
'use strict';
// Constants
var $$ = require('./const');
/**
* new Action(options)
*
* Base class for all actions. Used only for inherits
*
*
* ##### Options:
*
* - `optionStrings` A list of command-line option strings for the action.
* - `dest` Attribute to hold the created object(s)
* - `nargs` The number of command-line arguments that should be consumed.
* By default, one argument will be consumed and a single value will be
* produced.
* - `constant` Default value for an action with no value.
* - `defaultValue` The value to be produced if the option is not specified.
* - `type` Cast to 'string'|'int'|'float'|'complex'|function (string). If
* None, 'string'.
* - `choices` The choices available.
* - `required` True if the action must always be specified at the command
* line.
* - `help` The help describing the argument.
* - `metavar` The name to be used for the option's argument with the help
* string. If None, the 'dest' value will be used as the name.
*
* ##### nargs supported values:
*
* - `N` (an integer) consumes N arguments (and produces a list)
* - `?` consumes zero or one arguments
* - `*` consumes zero or more arguments (and produces a list)
* - `+` consumes one or more arguments (and produces a list)
*
* Note: that the difference between the default and nargs=1 is that with the
* default, a single value will be produced, while with nargs=1, a list
* containing a single value will be produced.
**/
var Action = module.exports = function Action(options) {
options = options || {};
this.optionStrings = options.optionStrings || [];
this.dest = options.dest;
this.nargs = options.nargs !== undefined ? options.nargs : null;
this.constant = options.constant !== undefined ? options.constant : null;
this.defaultValue = options.defaultValue;
this.type = options.type !== undefined ? options.type : null;
this.choices = options.choices !== undefined ? options.choices : null;
this.required = options.required !== undefined ? options.required: false;
this.help = options.help !== undefined ? options.help : null;
this.metavar = options.metavar !== undefined ? options.metavar : null;
if (!(this.optionStrings instanceof Array)) {
throw new Error('optionStrings should be an array');
}
if (this.required !== undefined && typeof(this.required) !== 'boolean') {
throw new Error('required should be a boolean');
}
};
/**
* Action#getName -> String
*
* Tells action name
**/
Action.prototype.getName = function () {
if (this.optionStrings.length > 0) {
return this.optionStrings.join('/');
} else if (this.metavar !== null && this.metavar !== $$.SUPPRESS) {
return this.metavar;
} else if (this.dest !== undefined && this.dest !== $$.SUPPRESS) {
return this.dest;
}
return null;
};
/**
* Action#isOptional -> Boolean
*
* Return true if optional
**/
Action.prototype.isOptional = function () {
return !this.isPositional();
};
/**
* Action#isPositional -> Boolean
*
* Return true if positional
**/
Action.prototype.isPositional = function () {
return (this.optionStrings.length === 0);
};
/**
* Action#call(parser, namespace, values, optionString) -> Void
* - parser (ArgumentParser): current parser
* - namespace (Namespace): namespace for output data
* - values (Array): parsed values
* - optionString (Array): input option string(not parsed)
*
* Call the action. Should be implemented in inherited classes
*
* ##### Example
*
* ActionCount.prototype.call = function (parser, namespace, values, optionString) {
* namespace.set(this.dest, (namespace[this.dest] || 0) + 1);
* };
*
**/
Action.prototype.call = function () {
throw new Error('.call() not defined');// Not Implemented error
};

55
node_modules/argparse/lib/action/append.js generated vendored Normal file
View file

@ -0,0 +1,55 @@
/*:nodoc:*
* class ActionAppend
*
* This action stores a list, and appends each argument value to the list.
* This is useful to allow an option to be specified multiple times.
* This class inherided from [[Action]]
*
**/
'use strict';
var util = require('util');
var Action = require('../action');
// Constants
var $$ = require('../const');
/*:nodoc:*
* new ActionAppend(options)
* - options (object): options hash see [[Action.new]]
*
* Note: options.nargs should be optional for constants
* and more then zero for other
**/
var ActionAppend = module.exports = function ActionAppend(options) {
options = options || {};
if (this.nargs <= 0) {
throw new Error('nargs for append actions must be > 0; if arg ' +
'strings are not supplying the value to append, ' +
'the append const action may be more appropriate');
}
if (!!this.constant && this.nargs !== $$.OPTIONAL) {
throw new Error('nargs must be OPTIONAL to supply const');
}
Action.call(this, options);
};
util.inherits(ActionAppend, Action);
/*:nodoc:*
* ActionAppend#call(parser, namespace, values, optionString) -> Void
* - parser (ArgumentParser): current parser
* - namespace (Namespace): namespace for output data
* - values (Array): parsed values
* - optionString (Array): input option string(not parsed)
*
* Call the action. Save result in namespace object
**/
ActionAppend.prototype.call = function (parser, namespace, values) {
var items = [].concat(namespace[this.dest] || []); // or _.clone
items.push(values);
namespace.set(this.dest, items);
};

47
node_modules/argparse/lib/action/append/constant.js generated vendored Normal file
View file

@ -0,0 +1,47 @@
/*:nodoc:*
* class ActionAppendConstant
*
* This stores a list, and appends the value specified by
* the const keyword argument to the list.
* (Note that the const keyword argument defaults to null.)
* The 'appendConst' action is typically useful when multiple
* arguments need to store constants to the same list.
*
* This class inherited from [[Action]]
**/
'use strict';
var util = require('util');
var Action = require('../../action');
/*:nodoc:*
* new ActionAppendConstant(options)
* - options (object): options hash see [[Action.new]]
*
**/
var ActionAppendConstant = module.exports = function ActionAppendConstant(options) {
options = options || {};
options.nargs = 0;
if (options.constant === undefined) {
throw new Error('constant option is required for appendAction');
}
Action.call(this, options);
};
util.inherits(ActionAppendConstant, Action);
/*:nodoc:*
* ActionAppendConstant#call(parser, namespace, values, optionString) -> Void
* - parser (ArgumentParser): current parser
* - namespace (Namespace): namespace for output data
* - values (Array): parsed values
* - optionString (Array): input option string(not parsed)
*
* Call the action. Save result in namespace object
**/
ActionAppendConstant.prototype.call = function (parser, namespace) {
var items = [].concat(namespace[this.dest] || []);
items.push(this.constant);
namespace.set(this.dest, items);
};

40
node_modules/argparse/lib/action/count.js generated vendored Normal file
View file

@ -0,0 +1,40 @@
/*:nodoc:*
* class ActionCount
*
* This counts the number of times a keyword argument occurs.
* For example, this is useful for increasing verbosity levels
*
* This class inherided from [[Action]]
*
**/
'use strict';
var util = require('util');
var Action = require('../action');
/*:nodoc:*
* new ActionCount(options)
* - options (object): options hash see [[Action.new]]
*
**/
var ActionCount = module.exports = function ActionCount(options) {
options = options || {};
options.nargs = 0;
Action.call(this, options);
};
util.inherits(ActionCount, Action);
/*:nodoc:*
* ActionCount#call(parser, namespace, values, optionString) -> Void
* - parser (ArgumentParser): current parser
* - namespace (Namespace): namespace for output data
* - values (Array): parsed values
* - optionString (Array): input option string(not parsed)
*
* Call the action. Save result in namespace object
**/
ActionCount.prototype.call = function (parser, namespace) {
namespace.set(this.dest, (namespace[this.dest] || 0) + 1);
};

48
node_modules/argparse/lib/action/help.js generated vendored Normal file
View file

@ -0,0 +1,48 @@
/*:nodoc:*
* class ActionHelp
*
* Support action for printing help
* This class inherided from [[Action]]
**/
'use strict';
var util = require('util');
var Action = require('../action');
// Constants
var $$ = require('../const');
/*:nodoc:*
* new ActionHelp(options)
* - options (object): options hash see [[Action.new]]
*
**/
var ActionHelp = module.exports = function ActionHelp(options) {
options = options || {};
if (options.defaultValue !== null) {
options.defaultValue = options.defaultValue;
}
else {
options.defaultValue = $$.SUPPRESS;
}
options.dest = (options.dest !== null ? options.dest: $$.SUPPRESS);
options.nargs = 0;
Action.call(this, options);
};
util.inherits(ActionHelp, Action);
/*:nodoc:*
* ActionHelp#call(parser, namespace, values, optionString)
* - parser (ArgumentParser): current parser
* - namespace (Namespace): namespace for output data
* - values (Array): parsed values
* - optionString (Array): input option string(not parsed)
*
* Print help and exit
**/
ActionHelp.prototype.call = function (parser) {
parser.printHelp();
parser.exit();
};

50
node_modules/argparse/lib/action/store.js generated vendored Normal file
View file

@ -0,0 +1,50 @@
/*:nodoc:*
* class ActionStore
*
* This action just stores the arguments value. This is the default action.
*
* This class inherited from [[Action]]
*
**/
'use strict';
var util = require('util');
var Action = require('../action');
// Constants
var $$ = require('../const');
/*:nodoc:*
* new ActionStore(options)
* - options (object): options hash see [[Action.new]]
*
**/
var ActionStore = module.exports = function ActionStore(options) {
options = options || {};
if (this.nargs <= 0) {
throw new Error('nargs for store actions must be > 0; if you ' +
'have nothing to store, actions such as store ' +
'true or store const may be more appropriate');
}
if (this.constant !== undefined && this.nargs !== $$.OPTIONAL) {
throw new Error('nargs must be OPTIONAL to supply const');
}
Action.call(this, options);
};
util.inherits(ActionStore, Action);
/*:nodoc:*
* ActionStore#call(parser, namespace, values, optionString) -> Void
* - parser (ArgumentParser): current parser
* - namespace (Namespace): namespace for output data
* - values (Array): parsed values
* - optionString (Array): input option string(not parsed)
*
* Call the action. Save result in namespace object
**/
ActionStore.prototype.call = function (parser, namespace, values) {
namespace.set(this.dest, values);
};

43
node_modules/argparse/lib/action/store/constant.js generated vendored Normal file
View file

@ -0,0 +1,43 @@
/*:nodoc:*
* class ActionStoreConstant
*
* This action stores the value specified by the const keyword argument.
* (Note that the const keyword argument defaults to the rather unhelpful null.)
* The 'store_const' action is most commonly used with optional
* arguments that specify some sort of flag.
*
* This class inherited from [[Action]]
**/
'use strict';
var util = require('util');
var Action = require('../../action');
/*:nodoc:*
* new ActionStoreConstant(options)
* - options (object): options hash see [[Action.new]]
*
**/
var ActionStoreConstant = module.exports = function ActionStoreConstant(options) {
options = options || {};
options.nargs = 0;
if (options.constant === undefined) {
throw new Error('constant option is required for storeAction');
}
Action.call(this, options);
};
util.inherits(ActionStoreConstant, Action);
/*:nodoc:*
* ActionStoreConstant#call(parser, namespace, values, optionString) -> Void
* - parser (ArgumentParser): current parser
* - namespace (Namespace): namespace for output data
* - values (Array): parsed values
* - optionString (Array): input option string(not parsed)
*
* Call the action. Save result in namespace object
**/
ActionStoreConstant.prototype.call = function (parser, namespace) {
namespace.set(this.dest, this.constant);
};

27
node_modules/argparse/lib/action/store/false.js generated vendored Normal file
View file

@ -0,0 +1,27 @@
/*:nodoc:*
* class ActionStoreFalse
*
* This action store the values False respectively.
* This is special cases of 'storeConst'
*
* This class inherited from [[Action]]
**/
'use strict';
var util = require('util');
var ActionStoreConstant = require('./constant');
/*:nodoc:*
* new ActionStoreFalse(options)
* - options (object): hash of options see [[Action.new]]
*
**/
var ActionStoreFalse = module.exports = function ActionStoreFalse(options) {
options = options || {};
options.constant = false;
options.defaultValue = options.defaultValue !== null ? options.defaultValue: true;
ActionStoreConstant.call(this, options);
};
util.inherits(ActionStoreFalse, ActionStoreConstant);

26
node_modules/argparse/lib/action/store/true.js generated vendored Normal file
View file

@ -0,0 +1,26 @@
/*:nodoc:*
* class ActionStoreTrue
*
* This action store the values True respectively.
* This isspecial cases of 'storeConst'
*
* This class inherited from [[Action]]
**/
'use strict';
var util = require('util');
var ActionStoreConstant = require('./constant');
/*:nodoc:*
* new ActionStoreTrue(options)
* - options (object): options hash see [[Action.new]]
*
**/
var ActionStoreTrue = module.exports = function ActionStoreTrue(options) {
options = options || {};
options.constant = true;
options.defaultValue = options.defaultValue !== null ? options.defaultValue: false;
ActionStoreConstant.call(this, options);
};
util.inherits(ActionStoreTrue, ActionStoreConstant);

148
node_modules/argparse/lib/action/subparsers.js generated vendored Normal file
View file

@ -0,0 +1,148 @@
/** internal
* class ActionSubparsers
*
* Support the creation of such sub-commands with the addSubparsers()
*
* This class inherited from [[Action]]
**/
'use strict';
var util = require('util');
var format = require('util').format;
var _ = require('lodash');
var Action = require('../action');
// Constants
var $$ = require('../const');
// Errors
var argumentErrorHelper = require('../argument/error');
/*:nodoc:*
* new ChoicesPseudoAction(name, help)
*
* Create pseudo action for correct help text
*
**/
var ChoicesPseudoAction = function (name, help) {
var options = {
optionStrings: [],
dest: name,
help: help
};
Action.call(this, options);
};
util.inherits(ChoicesPseudoAction, Action);
/**
* new ActionSubparsers(options)
* - options (object): options hash see [[Action.new]]
*
**/
var ActionSubparsers = module.exports = function ActionSubparsers(options) {
options = options || {};
options.dest = options.dest || $$.SUPPRESS;
options.nargs = $$.PARSER;
this.debug = (options.debug === true);
this._progPrefix = options.prog;
this._parserClass = options.parserClass;
this._nameParserMap = {};
this._choicesActions = [];
options.choices = this._nameParserMap;
Action.call(this, options);
};
util.inherits(ActionSubparsers, Action);
/*:nodoc:*
* ActionSubparsers#addParser(name, options) -> ArgumentParser
* - name (string): sub-command name
* - options (object): see [[ArgumentParser.new]]
*
* Note:
* addParser supports an additional aliases option,
* which allows multiple strings to refer to the same subparser.
* This example, like svn, aliases co as a shorthand for checkout
*
**/
ActionSubparsers.prototype.addParser = function (name, options) {
var parser;
var self = this;
options = options || {};
options.debug = (this.debug === true);
// set program from the existing prefix
if (!options.prog) {
options.prog = this._progPrefix + ' ' + name;
}
var aliases = options.aliases || [];
// create a pseudo-action to hold the choice help
if (!!options.help || _.isString(options.help)) {
var help = options.help;
delete options.help;
var choiceAction = new ChoicesPseudoAction(name, help);
this._choicesActions.push(choiceAction);
}
// create the parser and add it to the map
parser = new this._parserClass(options);
this._nameParserMap[name] = parser;
// make parser available under aliases also
aliases.forEach(function (alias) {
self._nameParserMap[alias] = parser;
});
return parser;
};
ActionSubparsers.prototype._getSubactions = function () {
return this._choicesActions;
};
/*:nodoc:*
* ActionSubparsers#call(parser, namespace, values, optionString) -> Void
* - parser (ArgumentParser): current parser
* - namespace (Namespace): namespace for output data
* - values (Array): parsed values
* - optionString (Array): input option string(not parsed)
*
* Call the action. Parse input aguments
**/
ActionSubparsers.prototype.call = function (parser, namespace, values) {
var parserName = values[0];
var argStrings = values.slice(1);
// set the parser name if requested
if (this.dest !== $$.SUPPRESS) {
namespace[this.dest] = parserName;
}
// select the parser
if (!!this._nameParserMap[parserName]) {
parser = this._nameParserMap[parserName];
} else {
throw argumentErrorHelper(format(
'Unknown parser "%s" (choices: [%s]).',
parserName,
_.keys(this._nameParserMap).join(', ')
));
}
// parse all the remaining options into the namespace
parser.parseArgs(argStrings, namespace);
};

50
node_modules/argparse/lib/action/version.js generated vendored Normal file
View file

@ -0,0 +1,50 @@
/*:nodoc:*
* class ActionVersion
*
* Support action for printing program version
* This class inherited from [[Action]]
**/
'use strict';
var util = require('util');
var Action = require('../action');
//
// Constants
//
var $$ = require('../const');
/*:nodoc:*
* new ActionVersion(options)
* - options (object): options hash see [[Action.new]]
*
**/
var ActionVersion = module.exports = function ActionVersion(options) {
options = options || {};
options.defaultValue = (!!options.defaultValue ? options.defaultValue: $$.SUPPRESS);
options.dest = (options.dest || $$.SUPPRESS);
options.nargs = 0;
this.version = options.version;
Action.call(this, options);
};
util.inherits(ActionVersion, Action);
/*:nodoc:*
* ActionVersion#call(parser, namespace, values, optionString) -> Void
* - parser (ArgumentParser): current parser
* - namespace (Namespace): namespace for output data
* - values (Array): parsed values
* - optionString (Array): input option string(not parsed)
*
* Print version and exit
**/
ActionVersion.prototype.call = function (parser) {
var version = this.version || parser.version;
var formatter = parser._getFormatter();
formatter.addText(version);
parser.exit(0, formatter.formatHelp());
};

479
node_modules/argparse/lib/action_container.js generated vendored Normal file
View file

@ -0,0 +1,479 @@
/** internal
* class ActionContainer
*
* Action container. Parent for [[ArgumentParser]] and [[ArgumentGroup]]
**/
'use strict';
var format = require('util').format;
var _ = require('lodash');
// Constants
var $$ = require('./const');
//Actions
var ActionHelp = require('./action/help');
var ActionAppend = require('./action/append');
var ActionAppendConstant = require('./action/append/constant');
var ActionCount = require('./action/count');
var ActionStore = require('./action/store');
var ActionStoreConstant = require('./action/store/constant');
var ActionStoreTrue = require('./action/store/true');
var ActionStoreFalse = require('./action/store/false');
var ActionVersion = require('./action/version');
var ActionSubparsers = require('./action/subparsers');
// Errors
var argumentErrorHelper = require('./argument/error');
/**
* new ActionContainer(options)
*
* Action container. Parent for [[ArgumentParser]] and [[ArgumentGroup]]
*
* ##### Options:
*
* - `description` -- A description of what the program does
* - `prefixChars` -- Characters that prefix optional arguments
* - `argumentDefault` -- The default value for all arguments
* - `conflictHandler` -- The conflict handler to use for duplicate arguments
**/
var ActionContainer = module.exports = function ActionContainer(options) {
options = options || {};
this.description = options.description;
this.argumentDefault = options.argumentDefault;
this.prefixChars = options.prefixChars || '';
this.conflictHandler = options.conflictHandler;
// set up registries
this._registries = {};
// register actions
this.register('action', null, ActionStore);
this.register('action', 'store', ActionStore);
this.register('action', 'storeConst', ActionStoreConstant);
this.register('action', 'storeTrue', ActionStoreTrue);
this.register('action', 'storeFalse', ActionStoreFalse);
this.register('action', 'append', ActionAppend);
this.register('action', 'appendConst', ActionAppendConstant);
this.register('action', 'count', ActionCount);
this.register('action', 'help', ActionHelp);
this.register('action', 'version', ActionVersion);
this.register('action', 'parsers', ActionSubparsers);
// raise an exception if the conflict handler is invalid
this._getHandler();
// action storage
this._actions = [];
this._optionStringActions = {};
// groups
this._actionGroups = [];
this._mutuallyExclusiveGroups = [];
// defaults storage
this._defaults = {};
// determines whether an "option" looks like a negative number
// -1, -1.5 -5e+4
this._regexpNegativeNumber = new RegExp('^[-]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?$');
// whether or not there are any optionals that look like negative
// numbers -- uses a list so it can be shared and edited
this._hasNegativeNumberOptionals = [];
};
// Groups must be required, then ActionContainer already defined
var ArgumentGroup = require('./argument/group');
var MutuallyExclusiveGroup = require('./argument/exclusive');
//
// Registration methods
//
/**
* ActionContainer#register(registryName, value, object) -> Void
* - registryName (String) : object type action|type
* - value (string) : keyword
* - object (Object|Function) : handler
*
* Register handlers
**/
ActionContainer.prototype.register = function (registryName, value, object) {
this._registries[registryName] = this._registries[registryName] || {};
this._registries[registryName][value] = object;
};
ActionContainer.prototype._registryGet = function (registryName, value, defaultValue) {
if (3 > arguments.length) {
defaultValue = null;
}
return this._registries[registryName][value] || defaultValue;
};
//
// Namespace default accessor methods
//
/**
* ActionContainer#setDefaults(options) -> Void
* - options (object):hash of options see [[Action.new]]
*
* Set defaults
**/
ActionContainer.prototype.setDefaults = function (options) {
options = options || {};
for (var property in options) {
this._defaults[property] = options[property];
}
// if these defaults match any existing arguments, replace the previous
// default on the object with the new one
this._actions.forEach(function (action) {
if (action.dest in options) {
action.defaultValue = options[action.dest];
}
});
};
/**
* ActionContainer#getDefault(dest) -> Mixed
* - dest (string): action destination
*
* Return action default value
**/
ActionContainer.prototype.getDefault = function (dest) {
var result = (_.has(this._defaults, dest)) ? this._defaults[dest] : null;
this._actions.forEach(function (action) {
if (action.dest === dest && _.has(action, 'defaultValue')) {
result = action.defaultValue;
}
});
return result;
};
//
// Adding argument actions
//
/**
* ActionContainer#addArgument(args, options) -> Object
* - args (Array): array of argument keys
* - options (Object): action objects see [[Action.new]]
*
* #### Examples
* - addArgument([-f, --foo], {action:'store', defaultValue=1, ...})
* - addArgument(['bar'], action: 'store', nargs:1, ...})
**/
ActionContainer.prototype.addArgument = function (args, options) {
args = args;
options = options || {};
if (!_.isArray(args)) {
throw new TypeError('addArgument first argument should be an array');
}
if (!_.isObject(options) || _.isArray(options)) {
throw new TypeError('addArgument second argument should be a hash');
}
// if no positional args are supplied or only one is supplied and
// it doesn't look like an option string, parse a positional argument
if (!args || args.length === 1 && this.prefixChars.indexOf(args[0][0]) < 0) {
if (args && !!options.dest) {
throw new Error('dest supplied twice for positional argument');
}
options = this._getPositional(args, options);
// otherwise, we're adding an optional argument
} else {
options = this._getOptional(args, options);
}
// if no default was supplied, use the parser-level default
if (_.isUndefined(options.defaultValue)) {
var dest = options.dest;
if (_.has(this._defaults, dest)) {
options.defaultValue = this._defaults[dest];
} else if (!_.isUndefined(this.argumentDefault)) {
options.defaultValue = this.argumentDefault;
}
}
// create the action object, and add it to the parser
var ActionClass = this._popActionClass(options);
if (! _.isFunction(ActionClass)) {
throw new Error(format('Unknown action "%s".', ActionClass));
}
var action = new ActionClass(options);
// throw an error if the action type is not callable
var typeFunction = this._registryGet('type', action.type, action.type);
if (!_.isFunction(typeFunction)) {
throw new Error(format('"%s" is not callable', typeFunction));
}
return this._addAction(action);
};
/**
* ActionContainer#addArgumentGroup(options) -> ArgumentGroup
* - options (Object): hash of options see [[ArgumentGroup.new]]
*
* Create new arguments groups
**/
ActionContainer.prototype.addArgumentGroup = function (options) {
var group = new ArgumentGroup(this, options);
this._actionGroups.push(group);
return group;
};
/**
* ActionContainer#addMutuallyExclusiveGroup(options) -> ArgumentGroup
* - options (Object): {required: false}
*
* Create new mutual exclusive groups
**/
ActionContainer.prototype.addMutuallyExclusiveGroup = function (options) {
var group = new MutuallyExclusiveGroup(this, options);
this._mutuallyExclusiveGroups.push(group);
return group;
};
ActionContainer.prototype._addAction = function (action) {
var self = this;
// resolve any conflicts
this._checkConflict(action);
// add to actions list
this._actions.push(action);
action.container = this;
// index the action by any option strings it has
action.optionStrings.forEach(function (optionString) {
self._optionStringActions[optionString] = action;
});
// set the flag if any option strings look like negative numbers
action.optionStrings.forEach(function (optionString) {
if (optionString.match(self._regexpNegativeNumber)) {
if (!_.any(self._hasNegativeNumberOptionals)) {
self._hasNegativeNumberOptionals.push(true);
}
}
});
// return the created action
return action;
};
ActionContainer.prototype._removeAction = function (action) {
var actionIndex = this._actions.indexOf(action);
if (actionIndex >= 0) {
this._actions.splice(actionIndex, 1);
}
};
ActionContainer.prototype._addContainerActions = function (container) {
// collect groups by titles
var titleGroupMap = {};
this._actionGroups.forEach(function (group) {
if (titleGroupMap[group.title]) {
throw new Error(format('Cannot merge actions - two groups are named "%s".', group.title));
}
titleGroupMap[group.title] = group;
});
// map each action to its group
var groupMap = {};
function actionHash(action) {
// unique (hopefully?) string suitable as dictionary key
return action.getName();
}
container._actionGroups.forEach(function (group) {
// if a group with the title exists, use that, otherwise
// create a new group matching the container's group
if (!titleGroupMap[group.title]) {
titleGroupMap[group.title] = this.addArgumentGroup({
title: group.title,
description: group.description
});
}
// map the actions to their new group
group._groupActions.forEach(function (action) {
groupMap[actionHash(action)] = titleGroupMap[group.title];
});
}, this);
// add container's mutually exclusive groups
// NOTE: if add_mutually_exclusive_group ever gains title= and
// description= then this code will need to be expanded as above
var mutexGroup;
container._mutuallyExclusiveGroups.forEach(function (group) {
mutexGroup = this.addMutuallyExclusiveGroup({
required: group.required
});
// map the actions to their new mutex group
group._groupActions.forEach(function (action) {
groupMap[actionHash(action)] = mutexGroup;
});
}, this); // forEach takes a 'this' argument
// add all actions to this container or their group
container._actions.forEach(function (action) {
var key = actionHash(action);
if (!!groupMap[key]) {
groupMap[key]._addAction(action);
}
else
{
this._addAction(action);
}
});
};
ActionContainer.prototype._getPositional = function (dest, options) {
if (_.isArray(dest)) {
dest = _.first(dest);
}
// make sure required is not specified
if (options.required) {
throw new Error('"required" is an invalid argument for positionals.');
}
// mark positional arguments as required if at least one is
// always required
if (options.nargs !== $$.OPTIONAL && options.nargs !== $$.ZERO_OR_MORE) {
options.required = true;
}
if (options.nargs === $$.ZERO_OR_MORE && options.defaultValue === undefined) {
options.required = true;
}
// return the keyword arguments with no option strings
options.dest = dest;
options.optionStrings = [];
return options;
};
ActionContainer.prototype._getOptional = function (args, options) {
var prefixChars = this.prefixChars;
var optionStrings = [];
var optionStringsLong = [];
// determine short and long option strings
args.forEach(function (optionString) {
// error on strings that don't start with an appropriate prefix
if (prefixChars.indexOf(optionString[0]) < 0) {
throw new Error(format('Invalid option string "%s": must start with a "%s".',
optionString,
prefixChars
));
}
// strings starting with two prefix characters are long options
optionStrings.push(optionString);
if (optionString.length > 1 && prefixChars.indexOf(optionString[1]) >= 0) {
optionStringsLong.push(optionString);
}
});
// infer dest, '--foo-bar' -> 'foo_bar' and '-x' -> 'x'
var dest = options.dest || null;
delete options.dest;
if (!dest) {
var optionStringDest = optionStringsLong.length ? optionStringsLong[0] :optionStrings[0];
dest = _.trim(optionStringDest, this.prefixChars);
if (dest.length === 0) {
throw new Error(
format('dest= is required for options like "%s"', optionStrings.join(', '))
);
}
dest = dest.replace(/-/g, '_');
}
// return the updated keyword arguments
options.dest = dest;
options.optionStrings = optionStrings;
return options;
};
ActionContainer.prototype._popActionClass = function (options, defaultValue) {
defaultValue = defaultValue || null;
var action = (options.action || defaultValue);
delete options.action;
var actionClass = this._registryGet('action', action, action);
return actionClass;
};
ActionContainer.prototype._getHandler = function () {
var handlerString = this.conflictHandler;
var handlerFuncName = "_handleConflict" + _.capitalize(handlerString);
var func = this[handlerFuncName];
if (typeof func === 'undefined') {
var msg = "invalid conflict resolution value: " + handlerString;
throw new Error(msg);
} else {
return func;
}
};
ActionContainer.prototype._checkConflict = function (action) {
var optionStringActions = this._optionStringActions;
var conflictOptionals = [];
// find all options that conflict with this option
// collect pairs, the string, and an existing action that it conflicts with
action.optionStrings.forEach(function (optionString) {
var conflOptional = optionStringActions[optionString];
if (typeof conflOptional !== 'undefined') {
conflictOptionals.push([optionString, conflOptional]);
}
});
if (conflictOptionals.length > 0) {
var conflictHandler = this._getHandler();
conflictHandler.call(this, action, conflictOptionals);
}
};
ActionContainer.prototype._handleConflictError = function (action, conflOptionals) {
var conflicts = _.map(conflOptionals, function (pair) {return pair[0]; });
conflicts = conflicts.join(', ');
throw argumentErrorHelper(
action,
format('Conflicting option string(s): %s', conflicts)
);
};
ActionContainer.prototype._handleConflictResolve = function (action, conflOptionals) {
// remove all conflicting options
var self = this;
conflOptionals.forEach(function (pair) {
var optionString = pair[0];
var conflictingAction = pair[1];
// remove the conflicting option string
var i = conflictingAction.optionStrings.indexOf(optionString);
if (i >= 0) {
conflictingAction.optionStrings.splice(i, 1);
}
delete self._optionStringActions[optionString];
// if the option now has no option string, remove it from the
// container holding it
if (conflictingAction.optionStrings.length === 0) {
conflictingAction.container._removeAction(conflictingAction);
}
});
};

14
node_modules/argparse/lib/argparse.js generated vendored Normal file
View file

@ -0,0 +1,14 @@
'use strict';
module.exports.ArgumentParser = require('./argument_parser.js');
module.exports.Namespace = require('./namespace');
module.exports.Action = require('./action');
module.exports.HelpFormatter = require('./help/formatter.js');
module.exports.Const = require('./const.js');
module.exports.ArgumentDefaultsHelpFormatter =
require('./help/added_formatters.js').ArgumentDefaultsHelpFormatter;
module.exports.RawDescriptionHelpFormatter =
require('./help/added_formatters.js').RawDescriptionHelpFormatter;
module.exports.RawTextHelpFormatter =
require('./help/added_formatters.js').RawTextHelpFormatter;

50
node_modules/argparse/lib/argument/error.js generated vendored Normal file
View file

@ -0,0 +1,50 @@
'use strict';
var format = require('util').format;
var ERR_CODE = 'ARGError';
/*:nodoc:*
* argumentError(argument, message) -> TypeError
* - argument (Object): action with broken argument
* - message (String): error message
*
* Error format helper. An error from creating or using an argument
* (optional or positional). The string value of this exception
* is the message, augmented with information
* about the argument that caused it.
*
* #####Example
*
* var argumentErrorHelper = require('./argument/error');
* if (conflictOptionals.length > 0) {
* throw argumentErrorHelper(
* action,
* format('Conflicting option string(s): %s', conflictOptionals.join(', '))
* );
* }
*
**/
module.exports = function (argument, message) {
var argumentName = null;
var errMessage;
var err;
if (argument.getName) {
argumentName = argument.getName();
} else {
argumentName = '' + argument;
}
if (!argumentName) {
errMessage = message;
} else {
errMessage = format('argument "%s": %s', argumentName, message);
}
err = new TypeError(errMessage);
err.code = ERR_CODE;
return err;
};

54
node_modules/argparse/lib/argument/exclusive.js generated vendored Normal file
View file

@ -0,0 +1,54 @@
/** internal
* class MutuallyExclusiveGroup
*
* Group arguments.
* By default, ArgumentParser groups command-line arguments
* into positional arguments and optional arguments
* when displaying help messages. When there is a better
* conceptual grouping of arguments than this default one,
* appropriate groups can be created using the addArgumentGroup() method
*
* This class inherited from [[ArgumentContainer]]
**/
'use strict';
var util = require('util');
var ArgumentGroup = require('./group');
/**
* new MutuallyExclusiveGroup(container, options)
* - container (object): main container
* - options (object): options.required -> true/false
*
* `required` could be an argument itself, but making it a property of
* the options argument is more consistent with the JS adaptation of the Python)
**/
var MutuallyExclusiveGroup = module.exports = function MutuallyExclusiveGroup(container, options) {
var required;
options = options || {};
required = options.required || false;
ArgumentGroup.call(this, container);
this.required = required;
};
util.inherits(MutuallyExclusiveGroup, ArgumentGroup);
MutuallyExclusiveGroup.prototype._addAction = function (action) {
var msg;
if (action.required) {
msg = 'mutually exclusive arguments must be optional';
throw new Error(msg);
}
action = this._container._addAction(action);
this._groupActions.push(action);
return action;
};
MutuallyExclusiveGroup.prototype._removeAction = function (action) {
this._container._removeAction(action);
this._groupActions.remove(action);
};

75
node_modules/argparse/lib/argument/group.js generated vendored Normal file
View file

@ -0,0 +1,75 @@
/** internal
* class ArgumentGroup
*
* Group arguments.
* By default, ArgumentParser groups command-line arguments
* into positional arguments and optional arguments
* when displaying help messages. When there is a better
* conceptual grouping of arguments than this default one,
* appropriate groups can be created using the addArgumentGroup() method
*
* This class inherited from [[ArgumentContainer]]
**/
'use strict';
var util = require('util');
var ActionContainer = require('../action_container');
/**
* new ArgumentGroup(container, options)
* - container (object): main container
* - options (object): hash of group options
*
* #### options
* - **prefixChars** group name prefix
* - **argumentDefault** default argument value
* - **title** group title
* - **description** group description
*
**/
var ArgumentGroup = module.exports = function ArgumentGroup(container, options) {
options = options || {};
// add any missing keyword arguments by checking the container
options.conflictHandler = (options.conflictHandler || container.conflictHandler);
options.prefixChars = (options.prefixChars || container.prefixChars);
options.argumentDefault = (options.argumentDefault || container.argumentDefault);
ActionContainer.call(this, options);
// group attributes
this.title = options.title;
this._groupActions = [];
// share most attributes with the container
this._container = container;
this._registries = container._registries;
this._actions = container._actions;
this._optionStringActions = container._optionStringActions;
this._defaults = container._defaults;
this._hasNegativeNumberOptionals = container._hasNegativeNumberOptionals;
this._mutuallyExclusiveGroups = container._mutuallyExclusiveGroups;
};
util.inherits(ArgumentGroup, ActionContainer);
ArgumentGroup.prototype._addAction = function (action) {
// Parent add action
action = ActionContainer.prototype._addAction.call(this, action);
this._groupActions.push(action);
return action;
};
ArgumentGroup.prototype._removeAction = function (action) {
// Parent remove action
ActionContainer.prototype._removeAction.call(this, action);
var actionIndex = this._groupActions.indexOf(action);
if (actionIndex >= 0) {
this._groupActions.splice(actionIndex, 1);
}
};

1170
node_modules/argparse/lib/argument_parser.js generated vendored Normal file

File diff suppressed because it is too large Load diff

18
node_modules/argparse/lib/const.js generated vendored Normal file
View file

@ -0,0 +1,18 @@
//
// Constants
//
module.exports.EOL = '\n';
module.exports.SUPPRESS = '==SUPPRESS==';
module.exports.OPTIONAL = '?';
module.exports.ZERO_OR_MORE = '*';
module.exports.ONE_OR_MORE = '+';
module.exports.PARSER = 'A...';
module.exports.REMAINDER = '...';
module.exports._UNRECOGNIZED_ARGS_ATTR = '_unrecognized_args';

88
node_modules/argparse/lib/help/added_formatters.js generated vendored Normal file
View file

@ -0,0 +1,88 @@
'use strict';
var util = require('util');
var _ = require('lodash');
// Constants
var $$ = require('../const');
var HelpFormatter = require('./formatter.js');
/**
* new RawDescriptionHelpFormatter(options)
* new ArgumentParser({formatterClass: argparse.RawDescriptionHelpFormatter, ...})
*
* Help message formatter which adds default values to argument help.
*
* Only the name of this class is considered a public API. All the methods
* provided by the class are considered an implementation detail.
**/
var ArgumentDefaultsHelpFormatter = function ArgumentDefaultsHelpFormatter(options) {
HelpFormatter.call(this, options);
};
util.inherits(ArgumentDefaultsHelpFormatter, HelpFormatter);
ArgumentDefaultsHelpFormatter.prototype._getHelpString = function (action) {
var help = action.help;
if (action.help.indexOf('%(defaultValue)s') === -1) {
if (action.defaultValue !== $$.SUPPRESS) {
var defaulting_nargs = [$$.OPTIONAL, $$.ZERO_OR_MORE];
if (action.isOptional() || (defaulting_nargs.indexOf(action.nargs) >= 0)) {
help += ' (default: %(defaultValue)s)';
}
}
}
return help;
};
module.exports.ArgumentDefaultsHelpFormatter = ArgumentDefaultsHelpFormatter;
/**
* new RawDescriptionHelpFormatter(options)
* new ArgumentParser({formatterClass: argparse.RawDescriptionHelpFormatter, ...})
*
* Help message formatter which retains any formatting in descriptions.
*
* Only the name of this class is considered a public API. All the methods
* provided by the class are considered an implementation detail.
**/
var RawDescriptionHelpFormatter = function RawDescriptionHelpFormatter(options) {
HelpFormatter.call(this, options);
};
util.inherits(RawDescriptionHelpFormatter, HelpFormatter);
RawDescriptionHelpFormatter.prototype._fillText = function (text, width, indent) {
var lines = text.split('\n');
lines = lines.map(function (line) {
return _.trimRight(indent + line);
});
return lines.join('\n');
};
module.exports.RawDescriptionHelpFormatter = RawDescriptionHelpFormatter;
/**
* new RawTextHelpFormatter(options)
* new ArgumentParser({formatterClass: argparse.RawTextHelpFormatter, ...})
*
* Help message formatter which retains formatting of all help text.
*
* Only the name of this class is considered a public API. All the methods
* provided by the class are considered an implementation detail.
**/
var RawTextHelpFormatter = function RawTextHelpFormatter(options) {
RawDescriptionHelpFormatter.call(this, options);
};
util.inherits(RawTextHelpFormatter, RawDescriptionHelpFormatter);
RawTextHelpFormatter.prototype._splitLines = function (text) {
return text.split('\n');
};
module.exports.RawTextHelpFormatter = RawTextHelpFormatter;

798
node_modules/argparse/lib/help/formatter.js generated vendored Normal file
View file

@ -0,0 +1,798 @@
/**
* class HelpFormatter
*
* Formatter for generating usage messages and argument help strings. Only the
* name of this class is considered a public API. All the methods provided by
* the class are considered an implementation detail.
*
* Do not call in your code, use this class only for inherits your own forvatter
*
* ToDo add [additonal formatters][1]
*
* [1]:http://docs.python.org/dev/library/argparse.html#formatter-class
**/
'use strict';
var _ = require('lodash');
var sprintf = require('sprintf-js').sprintf;
// Constants
var $$ = require('../const');
/*:nodoc:* internal
* new Support(parent, heding)
* - parent (object): parent section
* - heading (string): header string
*
**/
function Section(parent, heading) {
this._parent = parent;
this._heading = heading;
this._items = [];
}
/*:nodoc:* internal
* Section#addItem(callback) -> Void
* - callback (array): tuple with function and args
*
* Add function for single element
**/
Section.prototype.addItem = function (callback) {
this._items.push(callback);
};
/*:nodoc:* internal
* Section#formatHelp(formatter) -> string
* - formatter (HelpFormatter): current formatter
*
* Form help section string
*
**/
Section.prototype.formatHelp = function (formatter) {
var itemHelp, heading;
// format the indented section
if (!!this._parent) {
formatter._indent();
}
itemHelp = this._items.map(function (item) {
var obj, func, args;
obj = formatter;
func = item[0];
args = item[1];
return func.apply(obj, args);
});
itemHelp = formatter._joinParts(itemHelp);
if (!!this._parent) {
formatter._dedent();
}
// return nothing if the section was empty
if (!itemHelp) {
return '';
}
// add the heading if the section was non-empty
heading = '';
if (!!this._heading && this._heading !== $$.SUPPRESS) {
var currentIndent = formatter.currentIndent;
heading = _.repeat(' ', currentIndent) + this._heading + ':' + $$.EOL;
}
// join the section-initialize newline, the heading and the help
return formatter._joinParts([$$.EOL, heading, itemHelp, $$.EOL]);
};
/**
* new HelpFormatter(options)
*
* #### Options:
* - `prog`: program name
* - `indentIncriment`: indent step, default value 2
* - `maxHelpPosition`: max help position, default value = 24
* - `width`: line width
*
**/
var HelpFormatter = module.exports = function HelpFormatter(options) {
options = options || {};
this._prog = options.prog;
this._maxHelpPosition = options.maxHelpPosition || 24;
this._width = (options.width || ((process.env.COLUMNS || 80) - 2));
this._currentIndent = 0;
this._indentIncriment = options.indentIncriment || 2;
this._level = 0;
this._actionMaxLength = 0;
this._rootSection = new Section(null);
this._currentSection = this._rootSection;
this._whitespaceMatcher = new RegExp('\\s+', 'g');
this._longBreakMatcher = new RegExp($$.EOL + $$.EOL + $$.EOL + '+', 'g');
};
HelpFormatter.prototype._indent = function () {
this._currentIndent += this._indentIncriment;
this._level += 1;
};
HelpFormatter.prototype._dedent = function () {
this._currentIndent -= this._indentIncriment;
this._level -= 1;
if (this._currentIndent < 0) {
throw new Error('Indent decreased below 0.');
}
};
HelpFormatter.prototype._addItem = function (func, args) {
this._currentSection.addItem([func, args]);
};
//
// Message building methods
//
/**
* HelpFormatter#startSection(heading) -> Void
* - heading (string): header string
*
* Start new help section
*
* See alse [code example][1]
*
* ##### Example
*
* formatter.startSection(actionGroup.title);
* formatter.addText(actionGroup.description);
* formatter.addArguments(actionGroup._groupActions);
* formatter.endSection();
*
**/
HelpFormatter.prototype.startSection = function (heading) {
this._indent();
var section = new Section(this._currentSection, heading);
var func = section.formatHelp.bind(section);
this._addItem(func, [this]);
this._currentSection = section;
};
/**
* HelpFormatter#endSection -> Void
*
* End help section
*
* ##### Example
*
* formatter.startSection(actionGroup.title);
* formatter.addText(actionGroup.description);
* formatter.addArguments(actionGroup._groupActions);
* formatter.endSection();
**/
HelpFormatter.prototype.endSection = function () {
this._currentSection = this._currentSection._parent;
this._dedent();
};
/**
* HelpFormatter#addText(text) -> Void
* - text (string): plain text
*
* Add plain text into current section
*
* ##### Example
*
* formatter.startSection(actionGroup.title);
* formatter.addText(actionGroup.description);
* formatter.addArguments(actionGroup._groupActions);
* formatter.endSection();
*
**/
HelpFormatter.prototype.addText = function (text) {
if (!!text && text !== $$.SUPPRESS) {
this._addItem(this._formatText, [text]);
}
};
/**
* HelpFormatter#addUsage(usage, actions, groups, prefix) -> Void
* - usage (string): usage text
* - actions (array): actions list
* - groups (array): groups list
* - prefix (string): usage prefix
*
* Add usage data into current section
*
* ##### Example
*
* formatter.addUsage(this.usage, this._actions, []);
* return formatter.formatHelp();
*
**/
HelpFormatter.prototype.addUsage = function (usage, actions, groups, prefix) {
if (usage !== $$.SUPPRESS) {
this._addItem(this._formatUsage, [usage, actions, groups, prefix]);
}
};
/**
* HelpFormatter#addArgument(action) -> Void
* - action (object): action
*
* Add argument into current section
*
* Single variant of [[HelpFormatter#addArguments]]
**/
HelpFormatter.prototype.addArgument = function (action) {
if (action.help !== $$.SUPPRESS) {
var self = this;
// find all invocations
var invocations = [this._formatActionInvocation(action)];
var invocationLength = invocations[0].length;
var actionLength;
if (!!action._getSubactions) {
this._indent();
action._getSubactions().forEach(function (subaction) {
var invocationNew = self._formatActionInvocation(subaction);
invocations.push(invocationNew);
invocationLength = Math.max(invocationLength, invocationNew.length);
});
this._dedent();
}
// update the maximum item length
actionLength = invocationLength + this._currentIndent;
this._actionMaxLength = Math.max(this._actionMaxLength, actionLength);
// add the item to the list
this._addItem(this._formatAction, [action]);
}
};
/**
* HelpFormatter#addArguments(actions) -> Void
* - actions (array): actions list
*
* Mass add arguments into current section
*
* ##### Example
*
* formatter.startSection(actionGroup.title);
* formatter.addText(actionGroup.description);
* formatter.addArguments(actionGroup._groupActions);
* formatter.endSection();
*
**/
HelpFormatter.prototype.addArguments = function (actions) {
var self = this;
actions.forEach(function (action) {
self.addArgument(action);
});
};
//
// Help-formatting methods
//
/**
* HelpFormatter#formatHelp -> string
*
* Format help
*
* ##### Example
*
* formatter.addText(this.epilog);
* return formatter.formatHelp();
*
**/
HelpFormatter.prototype.formatHelp = function () {
var help = this._rootSection.formatHelp(this);
if (help) {
help = help.replace(this._longBreakMatcher, $$.EOL + $$.EOL);
help = _.trim(help, $$.EOL) + $$.EOL;
}
return help;
};
HelpFormatter.prototype._joinParts = function (partStrings) {
return partStrings.filter(function (part) {
return (!!part && part !== $$.SUPPRESS);
}).join('');
};
HelpFormatter.prototype._formatUsage = function (usage, actions, groups, prefix) {
if (!prefix && !_.isString(prefix)) {
prefix = 'usage: ';
}
actions = actions || [];
groups = groups || [];
// if usage is specified, use that
if (usage) {
usage = sprintf(usage, {prog: this._prog});
// if no optionals or positionals are available, usage is just prog
} else if (!usage && actions.length === 0) {
usage = this._prog;
// if optionals and positionals are available, calculate usage
} else if (!usage) {
var prog = this._prog;
var optionals = [];
var positionals = [];
var actionUsage;
var textWidth;
// split optionals from positionals
actions.forEach(function (action) {
if (action.isOptional()) {
optionals.push(action);
} else {
positionals.push(action);
}
});
// build full usage string
actionUsage = this._formatActionsUsage([].concat(optionals, positionals), groups);
usage = [prog, actionUsage].join(' ');
// wrap the usage parts if it's too long
textWidth = this._width - this._currentIndent;
if ((prefix.length + usage.length) > textWidth) {
// break usage into wrappable parts
var regexpPart = new RegExp('\\(.*?\\)+|\\[.*?\\]+|\\S+', 'g');
var optionalUsage = this._formatActionsUsage(optionals, groups);
var positionalUsage = this._formatActionsUsage(positionals, groups);
var optionalParts = optionalUsage.match(regexpPart);
var positionalParts = positionalUsage.match(regexpPart) || [];
if (optionalParts.join(' ') !== optionalUsage) {
throw new Error('assert "optionalParts.join(\' \') === optionalUsage"');
}
if (positionalParts.join(' ') !== positionalUsage) {
throw new Error('assert "positionalParts.join(\' \') === positionalUsage"');
}
// helper for wrapping lines
var _getLines = function (parts, indent, prefix) {
var lines = [];
var line = [];
var lineLength = !!prefix ? prefix.length - 1: indent.length - 1;
parts.forEach(function (part) {
if (lineLength + 1 + part.length > textWidth) {
lines.push(indent + line.join(' '));
line = [];
lineLength = indent.length - 1;
}
line.push(part);
lineLength += part.length + 1;
});
if (line) {
lines.push(indent + line.join(' '));
}
if (prefix) {
lines[0] = lines[0].substr(indent.length);
}
return lines;
};
var lines, indent, parts;
// if prog is short, follow it with optionals or positionals
if (prefix.length + prog.length <= 0.75 * textWidth) {
indent = _.repeat(' ', (prefix.length + prog.length + 1));
if (optionalParts) {
lines = [].concat(
_getLines([prog].concat(optionalParts), indent, prefix),
_getLines(positionalParts, indent)
);
} else if (positionalParts) {
lines = _getLines([prog].concat(positionalParts), indent, prefix);
} else {
lines = [prog];
}
// if prog is long, put it on its own line
} else {
indent = _.repeat(' ', prefix.length);
parts = optionalParts + positionalParts;
lines = _getLines(parts, indent);
if (lines.length > 1) {
lines = [].concat(
_getLines(optionalParts, indent),
_getLines(positionalParts, indent)
);
}
lines = [prog] + lines;
}
// join lines into usage
usage = lines.join($$.EOL);
}
}
// prefix with 'usage:'
return prefix + usage + $$.EOL + $$.EOL;
};
HelpFormatter.prototype._formatActionsUsage = function (actions, groups) {
// find group indices and identify actions in groups
var groupActions = [];
var inserts = [];
var self = this;
groups.forEach(function (group) {
var end;
var i;
var start = actions.indexOf(group._groupActions[0]);
if (start >= 0) {
end = start + group._groupActions.length;
//if (actions.slice(start, end) === group._groupActions) {
if (_.isEqual(actions.slice(start, end), group._groupActions)) {
group._groupActions.forEach(function (action) {
groupActions.push(action);
});
if (!group.required) {
if (!!inserts[start]) {
inserts[start] += ' [';
}
else {
inserts[start] = '[';
}
inserts[end] = ']';
} else {
if (!!inserts[start]) {
inserts[start] += ' (';
}
else {
inserts[start] = '(';
}
inserts[end] = ')';
}
for (i = start + 1; i < end; i += 1) {
inserts[i] = '|';
}
}
}
});
// collect all actions format strings
var parts = [];
actions.forEach(function (action, actionIndex) {
var part;
var optionString;
var argsDefault;
var argsString;
// suppressed arguments are marked with None
// remove | separators for suppressed arguments
if (action.help === $$.SUPPRESS) {
parts.push(null);
if (inserts[actionIndex] === '|') {
inserts.splice(actionIndex, actionIndex);
} else if (inserts[actionIndex + 1] === '|') {
inserts.splice(actionIndex + 1, actionIndex + 1);
}
// produce all arg strings
} else if (!action.isOptional()) {
part = self._formatArgs(action, action.dest);
// if it's in a group, strip the outer []
if (groupActions.indexOf(action) >= 0) {
if (part[0] === '[' && part[part.length - 1] === ']') {
part = part.slice(1, -1);
}
}
// add the action string to the list
parts.push(part);
// produce the first way to invoke the option in brackets
} else {
optionString = action.optionStrings[0];
// if the Optional doesn't take a value, format is: -s or --long
if (action.nargs === 0) {
part = '' + optionString;
// if the Optional takes a value, format is: -s ARGS or --long ARGS
} else {
argsDefault = action.dest.toUpperCase();
argsString = self._formatArgs(action, argsDefault);
part = optionString + ' ' + argsString;
}
// make it look optional if it's not required or in a group
if (!action.required && groupActions.indexOf(action) < 0) {
part = '[' + part + ']';
}
// add the action string to the list
parts.push(part);
}
});
// insert things at the necessary indices
for (var i = inserts.length - 1; i >= 0; --i) {
if (inserts[i] !== null) {
parts.splice(i, 0, inserts[i]);
}
}
// join all the action items with spaces
var text = parts.filter(function (part) {
return !!part;
}).join(' ');
// clean up separators for mutually exclusive groups
text = text.replace(/([\[(]) /g, '$1'); // remove spaces
text = text.replace(/ ([\])])/g, '$1');
text = text.replace(/\[ *\]/g, ''); // remove empty groups
text = text.replace(/\( *\)/g, '');
text = text.replace(/\(([^|]*)\)/g, '$1'); // remove () from single action groups
text = _.trim(text);
// return the text
return text;
};
HelpFormatter.prototype._formatText = function (text) {
text = sprintf(text, {prog: this._prog});
var textWidth = this._width - this._currentIndent;
var indentIncriment = _.repeat(' ', this._currentIndent);
return this._fillText(text, textWidth, indentIncriment) + $$.EOL + $$.EOL;
};
HelpFormatter.prototype._formatAction = function (action) {
var self = this;
var helpText;
var helpLines;
var parts;
var indentFirst;
// determine the required width and the entry label
var helpPosition = Math.min(this._actionMaxLength + 2, this._maxHelpPosition);
var helpWidth = this._width - helpPosition;
var actionWidth = helpPosition - this._currentIndent - 2;
var actionHeader = this._formatActionInvocation(action);
// no help; start on same line and add a final newline
if (!action.help) {
actionHeader = _.repeat(' ', this._currentIndent) + actionHeader + $$.EOL;
// short action name; start on the same line and pad two spaces
} else if (actionHeader.length <= actionWidth) {
actionHeader = _.repeat(' ', this._currentIndent) +
actionHeader +
' ' +
_.repeat(' ', actionWidth - actionHeader.length);
indentFirst = 0;
// long action name; start on the next line
} else {
actionHeader = _.repeat(' ', this._currentIndent) + actionHeader + $$.EOL;
indentFirst = helpPosition;
}
// collect the pieces of the action help
parts = [actionHeader];
// if there was help for the action, add lines of help text
if (!!action.help) {
helpText = this._expandHelp(action);
helpLines = this._splitLines(helpText, helpWidth);
parts.push(_.repeat(' ', indentFirst) + helpLines[0] + $$.EOL);
helpLines.slice(1).forEach(function (line) {
parts.push(_.repeat(' ', helpPosition) + line + $$.EOL);
});
// or add a newline if the description doesn't end with one
} else if (actionHeader.charAt(actionHeader.length - 1) !== $$.EOL) {
parts.push($$.EOL);
}
// if there are any sub-actions, add their help as well
if (!!action._getSubactions) {
this._indent();
action._getSubactions().forEach(function (subaction) {
parts.push(self._formatAction(subaction));
});
this._dedent();
}
// return a single string
return this._joinParts(parts);
};
HelpFormatter.prototype._formatActionInvocation = function (action) {
if (!action.isOptional()) {
var format_func = this._metavarFormatter(action, action.dest);
var metavars = format_func(1);
return metavars[0];
} else {
var parts = [];
var argsDefault;
var argsString;
// if the Optional doesn't take a value, format is: -s, --long
if (action.nargs === 0) {
parts = parts.concat(action.optionStrings);
// if the Optional takes a value, format is: -s ARGS, --long ARGS
} else {
argsDefault = action.dest.toUpperCase();
argsString = this._formatArgs(action, argsDefault);
action.optionStrings.forEach(function (optionString) {
parts.push(optionString + ' ' + argsString);
});
}
return parts.join(', ');
}
};
HelpFormatter.prototype._metavarFormatter = function (action, metavarDefault) {
var result;
if (!!action.metavar || action.metavar === '') {
result = action.metavar;
} else if (!!action.choices) {
var choices = action.choices;
if (_.isString(choices)) {
choices = choices.split('').join(', ');
} else if (_.isArray(choices)) {
choices = choices.join(',');
}
else
{
choices = _.keys(choices).join(',');
}
result = '{' + choices + '}';
} else {
result = metavarDefault;
}
return function (size) {
if (Array.isArray(result)) {
return result;
} else {
var metavars = [];
for (var i = 0; i < size; i += 1) {
metavars.push(result);
}
return metavars;
}
};
};
HelpFormatter.prototype._formatArgs = function (action, metavarDefault) {
var result;
var metavars;
var buildMetavar = this._metavarFormatter(action, metavarDefault);
switch (action.nargs) {
case undefined:
case null:
metavars = buildMetavar(1);
result = '' + metavars[0];
break;
case $$.OPTIONAL:
metavars = buildMetavar(1);
result = '[' + metavars[0] + ']';
break;
case $$.ZERO_OR_MORE:
metavars = buildMetavar(2);
result = '[' + metavars[0] + ' [' + metavars[1] + ' ...]]';
break;
case $$.ONE_OR_MORE:
metavars = buildMetavar(2);
result = '' + metavars[0] + ' [' + metavars[1] + ' ...]';
break;
case $$.REMAINDER:
result = '...';
break;
case $$.PARSER:
metavars = buildMetavar(1);
result = metavars[0] + ' ...';
break;
default:
metavars = buildMetavar(action.nargs);
result = metavars.join(' ');
}
return result;
};
HelpFormatter.prototype._expandHelp = function (action) {
var params = { prog: this._prog };
Object.keys(action).forEach(function (actionProperty) {
var actionValue = action[actionProperty];
if (actionValue !== $$.SUPPRESS) {
params[actionProperty] = actionValue;
}
});
if (!!params.choices) {
if (_.isString(params.choices)) {
params.choices = params.choices.split('').join(', ');
}
else if (_.isArray(params.choices)) {
params.choices = params.choices.join(', ');
}
else {
params.choices = _.keys(params.choices).join(', ');
}
}
return sprintf(this._getHelpString(action), params);
};
HelpFormatter.prototype._splitLines = function (text, width) {
var lines = [];
var delimiters = [" ", ".", ",", "!", "?"];
var re = new RegExp('[' + delimiters.join('') + '][^' + delimiters.join('') + ']*$');
text = text.replace(/[\n\|\t]/g, ' ');
text = _.trim(text);
text = text.replace(this._whitespaceMatcher, ' ');
// Wraps the single paragraph in text (a string) so every line
// is at most width characters long.
text.split($$.EOL).forEach(function (line) {
if (width >= line.length) {
lines.push(line);
return;
}
var wrapStart = 0;
var wrapEnd = width;
var delimiterIndex = 0;
while (wrapEnd <= line.length) {
if (wrapEnd !== line.length && delimiters.indexOf(line[wrapEnd] < -1)) {
delimiterIndex = (re.exec(line.substring(wrapStart, wrapEnd)) || {}).index;
wrapEnd = wrapStart + delimiterIndex + 1;
}
lines.push(line.substring(wrapStart, wrapEnd));
wrapStart = wrapEnd;
wrapEnd += width;
}
if (wrapStart < line.length) {
lines.push(line.substring(wrapStart, wrapEnd));
}
});
return lines;
};
HelpFormatter.prototype._fillText = function (text, width, indent) {
var lines = this._splitLines(text, width);
lines = lines.map(function (line) {
return indent + line;
});
return lines.join($$.EOL);
};
HelpFormatter.prototype._getHelpString = function (action) {
return action.help;
};

77
node_modules/argparse/lib/namespace.js generated vendored Normal file
View file

@ -0,0 +1,77 @@
/**
* class Namespace
*
* Simple object for storing attributes. Implements equality by attribute names
* and values, and provides a simple string representation.
*
* See also [original guide][1]
*
* [1]:http://docs.python.org/dev/library/argparse.html#the-namespace-object
**/
'use strict';
var _ = require('lodash');
/**
* new Namespace(options)
* - options(object): predefined propertis for result object
*
**/
var Namespace = module.exports = function Namespace(options) {
_.extend(this, options);
};
/**
* Namespace#isset(key) -> Boolean
* - key (string|number): property name
*
* Tells whenever `namespace` contains given `key` or not.
**/
Namespace.prototype.isset = function (key) {
return _.has(this, key);
};
/**
* Namespace#set(key, value) -> self
* -key (string|number|object): propery name
* -value (mixed): new property value
*
* Set the property named key with value.
* If key object then set all key properties to namespace object
**/
Namespace.prototype.set = function (key, value) {
if (typeof (key) === 'object') {
_.extend(this, key);
} else {
this[key] = value;
}
return this;
};
/**
* Namespace#get(key, defaultValue) -> mixed
* - key (string|number): property name
* - defaultValue (mixed): default value
*
* Return the property key or defaulValue if not set
**/
Namespace.prototype.get = function (key, defaultValue) {
return !this[key] ? defaultValue: this[key];
};
/**
* Namespace#unset(key, defaultValue) -> mixed
* - key (string|number): property name
* - defaultValue (mixed): default value
*
* Return data[key](and delete it) or defaultValue
**/
Namespace.prototype.unset = function (key, defaultValue) {
var value = this[key];
if (value !== null) {
delete this[key];
return value;
} else {
return defaultValue;
}
};

86
node_modules/argparse/package.json generated vendored Normal file
View file

@ -0,0 +1,86 @@
{
"_args": [
[
"argparse@^1.0.2",
"/Users/okennedy/Desktop/Website/node_modules/js-yaml"
]
],
"_from": "argparse@>=1.0.2 <2.0.0",
"_id": "argparse@1.0.3",
"_inCache": true,
"_installable": true,
"_location": "/argparse",
"_nodeVersion": "4.2.1",
"_npmUser": {
"email": "vitaly@rcdesign.ru",
"name": "vitaly"
},
"_npmVersion": "2.14.7",
"_phantomChildren": {},
"_requested": {
"name": "argparse",
"raw": "argparse@^1.0.2",
"rawSpec": "^1.0.2",
"scope": null,
"spec": ">=1.0.2 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/js-yaml"
],
"_resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.3.tgz",
"_shasum": "14389deeb0c28fc4cda9405b9f532a4e3785ce84",
"_shrinkwrap": null,
"_spec": "argparse@^1.0.2",
"_where": "/Users/okennedy/Desktop/Website/node_modules/js-yaml",
"bugs": {
"url": "https://github.com/nodeca/argparse/issues"
},
"contributors": [
{
"name": "Eugene Shkuropat"
},
{
"name": "Paul Jacobson"
}
],
"dependencies": {
"lodash": ">= 3.2.0 < 4.0.0",
"sprintf-js": "~1.0.2"
},
"description": "Very powerful CLI arguments parser. Native port of argparse - python's options parsing library",
"devDependencies": {
"mocha": "*"
},
"directories": {},
"dist": {
"shasum": "14389deeb0c28fc4cda9405b9f532a4e3785ce84",
"tarball": "http://registry.npmjs.org/argparse/-/argparse-1.0.3.tgz"
},
"gitHead": "e46e471f113ba31074c0d0c156f93fd7a618b27c",
"homepage": "https://github.com/nodeca/argparse",
"keywords": [
"argparse",
"args",
"cli",
"option",
"parser"
],
"license": "MIT",
"maintainers": [
{
"name": "vitaly",
"email": "vitaly@rcdesign.ru"
}
],
"name": "argparse",
"optionalDependencies": {},
"repository": {
"type": "git",
"url": "git+https://github.com/nodeca/argparse.git"
},
"scripts": {
"test": "make test"
},
"version": "1.0.3"
}

7
node_modules/array-differ/index.js generated vendored Normal file
View file

@ -0,0 +1,7 @@
'use strict';
module.exports = function (arr) {
var rest = [].concat.apply([], [].slice.call(arguments, 1));
return arr.filter(function (el) {
return rest.indexOf(el) === -1;
});
};

86
node_modules/array-differ/package.json generated vendored Normal file
View file

@ -0,0 +1,86 @@
{
"_args": [
[
"array-differ@^1.0.0",
"/Users/okennedy/Desktop/Website/node_modules/multimatch"
]
],
"_from": "array-differ@>=1.0.0 <2.0.0",
"_id": "array-differ@1.0.0",
"_inCache": true,
"_installable": true,
"_location": "/array-differ",
"_npmUser": {
"email": "sindresorhus@gmail.com",
"name": "sindresorhus"
},
"_npmVersion": "1.4.14",
"_phantomChildren": {},
"_requested": {
"name": "array-differ",
"raw": "array-differ@^1.0.0",
"rawSpec": "^1.0.0",
"scope": null,
"spec": ">=1.0.0 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/multimatch"
],
"_resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz",
"_shasum": "eff52e3758249d33be402b8bb8e564bb2b5d4031",
"_shrinkwrap": null,
"_spec": "array-differ@^1.0.0",
"_where": "/Users/okennedy/Desktop/Website/node_modules/multimatch",
"author": {
"email": "sindresorhus@gmail.com",
"name": "Sindre Sorhus",
"url": "http://sindresorhus.com"
},
"bugs": {
"url": "https://github.com/sindresorhus/array-differ/issues"
},
"dependencies": {},
"description": "Create an array with values that are present in the first input array but not additional ones",
"devDependencies": {
"mocha": "*"
},
"directories": {},
"dist": {
"shasum": "eff52e3758249d33be402b8bb8e564bb2b5d4031",
"tarball": "http://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"gitHead": "e91802976c4710eef8dea2090d48e48525cf41b1",
"homepage": "https://github.com/sindresorhus/array-differ",
"keywords": [
"array",
"diff",
"differ",
"difference",
"exclude",
"filter"
],
"license": "MIT",
"maintainers": [
{
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
}
],
"name": "array-differ",
"optionalDependencies": {},
"repository": {
"type": "git",
"url": "git://github.com/sindresorhus/array-differ"
},
"scripts": {
"test": "mocha"
},
"version": "1.0.0"
}

41
node_modules/array-differ/readme.md generated vendored Normal file
View file

@ -0,0 +1,41 @@
# array-differ [![Build Status](https://travis-ci.org/sindresorhus/array-differ.svg?branch=master)](https://travis-ci.org/sindresorhus/array-differ)
> Create an array with values that are present in the first input array but not additional ones
## Install
```sh
$ npm install --save array-differ
```
## Usage
```js
var arrayDiffer = require('array-differ');
arrayDiffer([2, 3, 4], [3, 50]);
//=> [2, 4]
```
## API
### arrayDiffer(input, values, [values, ...])
Returns the new array.
#### input
Type: `array`
#### values
Type: `array`
Arrays of values to exclude.
## License
MIT © [Sindre Sorhus](http://sindresorhus.com)

6
node_modules/array-union/index.js generated vendored Normal file
View file

@ -0,0 +1,6 @@
'use strict';
var arrayUniq = require('array-uniq');
module.exports = function () {
return arrayUniq([].concat.apply([], arguments));
};

93
node_modules/array-union/package.json generated vendored Normal file
View file

@ -0,0 +1,93 @@
{
"_args": [
[
"array-union@^1.0.1",
"/Users/okennedy/Desktop/Website/node_modules/multimatch"
]
],
"_from": "array-union@>=1.0.1 <2.0.0",
"_id": "array-union@1.0.1",
"_inCache": true,
"_installable": true,
"_location": "/array-union",
"_nodeVersion": "0.10.32",
"_npmUser": {
"email": "sindresorhus@gmail.com",
"name": "sindresorhus"
},
"_npmVersion": "2.1.5",
"_phantomChildren": {},
"_requested": {
"name": "array-union",
"raw": "array-union@^1.0.1",
"rawSpec": "^1.0.1",
"scope": null,
"spec": ">=1.0.1 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/multimatch"
],
"_resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.1.tgz",
"_shasum": "4d410fc8395cb247637124bade9e3f547d5d55f2",
"_shrinkwrap": null,
"_spec": "array-union@^1.0.1",
"_where": "/Users/okennedy/Desktop/Website/node_modules/multimatch",
"author": {
"email": "sindresorhus@gmail.com",
"name": "Sindre Sorhus",
"url": "http://sindresorhus.com"
},
"bugs": {
"url": "https://github.com/sindresorhus/array-union/issues"
},
"dependencies": {
"array-uniq": "^1.0.1"
},
"description": "Create an array of unique values, in order, from the input arrays",
"devDependencies": {
"mocha": "*"
},
"directories": {},
"dist": {
"shasum": "4d410fc8395cb247637124bade9e3f547d5d55f2",
"tarball": "http://registry.npmjs.org/array-union/-/array-union-1.0.1.tgz"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"gitHead": "d0e72cc6fbff57273032e45050c51ff44c8e137c",
"homepage": "https://github.com/sindresorhus/array-union",
"keywords": [
"arr",
"array",
"combine",
"duplicate",
"merge",
"remove",
"set",
"union",
"uniq",
"unique"
],
"license": "MIT",
"maintainers": [
{
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
}
],
"name": "array-union",
"optionalDependencies": {},
"repository": {
"type": "git",
"url": "https://github.com/sindresorhus/array-union"
},
"scripts": {
"test": "mocha"
},
"version": "1.0.1"
}

28
node_modules/array-union/readme.md generated vendored Normal file
View file

@ -0,0 +1,28 @@
# array-union [![Build Status](https://travis-ci.org/sindresorhus/array-union.svg?branch=master)](https://travis-ci.org/sindresorhus/array-union)
> Create an array of unique values, in order, from the input arrays
## Install
```sh
$ npm install --save array-union
```
## Usage
```js
var arrayUnion = require('array-union');
arrayUnion([1, 1, 2, 3], [2, 3]);
//=> [1, 2, 3]
arrayUnion(['foo', 'foo', 'bar'], ['foo']);
//=> ['foo', 'bar']
```
## License
MIT © [Sindre Sorhus](http://sindresorhus.com)

60
node_modules/array-uniq/index.js generated vendored Normal file
View file

@ -0,0 +1,60 @@
'use strict';
// there's 3 implementations written in increasing order of efficiency
// 1 - no Set type is defined
function uniqNoSet(arr) {
var ret = [];
for (var i = 0; i < arr.length; i++) {
if (ret.indexOf(arr[i]) === -1) {
ret.push(arr[i]);
}
}
return ret;
}
// 2 - a simple Set type is defined
function uniqSet(arr) {
var seen = new Set();
return arr.filter(function (el) {
if (!seen.has(el)) {
seen.add(el);
return true;
}
});
}
// 3 - a standard Set type is defined and it has a forEach method
function uniqSetWithForEach(arr) {
var ret = [];
(new Set(arr)).forEach(function (el) {
ret.push(el);
});
return ret;
}
// V8 currently has a broken implementation
// https://github.com/joyent/node/issues/8449
function doesForEachActuallyWork() {
var ret = false;
(new Set([true])).forEach(function (el) {
ret = el;
});
return ret === true;
}
if ('Set' in global) {
if (typeof Set.prototype.forEach === 'function' && doesForEachActuallyWork()) {
module.exports = uniqSetWithForEach;
} else {
module.exports = uniqSet;
}
} else {
module.exports = uniqNoSet;
}

91
node_modules/array-uniq/package.json generated vendored Normal file
View file

@ -0,0 +1,91 @@
{
"_args": [
[
"array-uniq@^1.0.1",
"/Users/okennedy/Desktop/Website/node_modules/array-union"
]
],
"_from": "array-uniq@>=1.0.1 <2.0.0",
"_id": "array-uniq@1.0.2",
"_inCache": true,
"_installable": true,
"_location": "/array-uniq",
"_nodeVersion": "0.10.32",
"_npmUser": {
"email": "sindresorhus@gmail.com",
"name": "sindresorhus"
},
"_npmVersion": "2.1.5",
"_phantomChildren": {},
"_requested": {
"name": "array-uniq",
"raw": "array-uniq@^1.0.1",
"rawSpec": "^1.0.1",
"scope": null,
"spec": ">=1.0.1 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/array-union"
],
"_resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.2.tgz",
"_shasum": "5fcc373920775723cfd64d65c64bef53bf9eba6d",
"_shrinkwrap": null,
"_spec": "array-uniq@^1.0.1",
"_where": "/Users/okennedy/Desktop/Website/node_modules/array-union",
"author": {
"email": "sindresorhus@gmail.com",
"name": "Sindre Sorhus",
"url": "http://sindresorhus.com"
},
"bugs": {
"url": "https://github.com/sindresorhus/array-uniq/issues"
},
"dependencies": {},
"description": "Create an array without duplicates",
"devDependencies": {
"es6-set": "^0.1.0",
"mocha": "*",
"require-uncached": "^1.0.2"
},
"directories": {},
"dist": {
"shasum": "5fcc373920775723cfd64d65c64bef53bf9eba6d",
"tarball": "http://registry.npmjs.org/array-uniq/-/array-uniq-1.0.2.tgz"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"gitHead": "d5e311f37692dfd25ec216490df10632ce5f69f3",
"homepage": "https://github.com/sindresorhus/array-uniq",
"keywords": [
"arr",
"array",
"duplicate",
"es6",
"remove",
"set",
"uniq",
"unique"
],
"license": "MIT",
"maintainers": [
{
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
}
],
"name": "array-uniq",
"optionalDependencies": {},
"repository": {
"type": "git",
"url": "https://github.com/sindresorhus/array-uniq"
},
"scripts": {
"test": "mocha"
},
"version": "1.0.2"
}

30
node_modules/array-uniq/readme.md generated vendored Normal file
View file

@ -0,0 +1,30 @@
# array-uniq [![Build Status](https://travis-ci.org/sindresorhus/array-uniq.svg?branch=master)](https://travis-ci.org/sindresorhus/array-uniq)
> Create an array without duplicates
It's already pretty fast, but will be much faster when [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) becomes available in V8 (especially with large arrays).
## Install
```sh
$ npm install --save array-uniq
```
## Usage
```js
var arrayUniq = require('array-uniq');
arrayUniq([1, 1, 2, 3, 3]);
//=> [1, 2, 3]
arrayUniq(['foo', 'foo', 'bar', 'foo']);
//=> ['foo', 'bar']
```
## License
MIT © [Sindre Sorhus](http://sindresorhus.com)

8
node_modules/arrify/index.js generated vendored Normal file
View file

@ -0,0 +1,8 @@
'use strict';
module.exports = function (val) {
if (val == null) {
return [];
}
return Array.isArray(val) ? val : [val];
};

21
node_modules/arrify/license generated vendored Normal file
View 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.

87
node_modules/arrify/package.json generated vendored Normal file
View file

@ -0,0 +1,87 @@
{
"_args": [
[
"arrify@^1.0.0",
"/Users/okennedy/Desktop/Website/node_modules/multimatch"
]
],
"_from": "arrify@>=1.0.0 <2.0.0",
"_id": "arrify@1.0.0",
"_inCache": true,
"_installable": true,
"_location": "/arrify",
"_nodeVersion": "0.12.0",
"_npmUser": {
"email": "sindresorhus@gmail.com",
"name": "sindresorhus"
},
"_npmVersion": "2.5.0",
"_phantomChildren": {},
"_requested": {
"name": "arrify",
"raw": "arrify@^1.0.0",
"rawSpec": "^1.0.0",
"scope": null,
"spec": ">=1.0.0 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/multimatch"
],
"_resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.0.tgz",
"_shasum": "d6c361518250802fa2147ea7fb67597128cb8c81",
"_shrinkwrap": null,
"_spec": "arrify@^1.0.0",
"_where": "/Users/okennedy/Desktop/Website/node_modules/multimatch",
"author": {
"email": "sindresorhus@gmail.com",
"name": "Sindre Sorhus",
"url": "sindresorhus.com"
},
"bugs": {
"url": "https://github.com/sindresorhus/arrify/issues"
},
"dependencies": {},
"description": "Convert a value to an array",
"devDependencies": {
"ava": "0.0.4"
},
"directories": {},
"dist": {
"shasum": "d6c361518250802fa2147ea7fb67597128cb8c81",
"tarball": "http://registry.npmjs.org/arrify/-/arrify-1.0.0.tgz"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"gitHead": "4576e944677c722c356480b17a6d709d34d0733c",
"homepage": "https://github.com/sindresorhus/arrify",
"keywords": [
"arr",
"array",
"arrayify",
"arrify",
"convert",
"value"
],
"license": "MIT",
"maintainers": [
{
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
}
],
"name": "arrify",
"optionalDependencies": {},
"repository": {
"type": "git",
"url": "https://github.com/sindresorhus/arrify"
},
"scripts": {
"test": "node test.js"
},
"version": "1.0.0"
}

36
node_modules/arrify/readme.md generated vendored Normal file
View file

@ -0,0 +1,36 @@
# arrify [![Build Status](https://travis-ci.org/sindresorhus/arrify.svg?branch=master)](https://travis-ci.org/sindresorhus/arrify)
> Convert a value to an array
## Install
```
$ npm install --save arrify
```
## Usage
```js
var arrify = require('arrify');
arrify('unicorn');
//=> ['unicorn']
arrify(['unicorn']);
//=> ['unicorn']
arrify(null);
//=> []
arrift(undefined);
//=> []
```
*Supplying `null` or `undefined` results in an empty array.*
## License
MIT © [Sindre Sorhus](http://sindresorhus.com)

5
node_modules/async/.travis.yml generated vendored Normal file
View file

@ -0,0 +1,5 @@
language: node_js
node_js:
- "0.10"
- "0.12"
- "iojs"

19
node_modules/async/LICENSE generated vendored Normal file
View file

@ -0,0 +1,19 @@
Copyright (c) 2010-2014 Caolan McMahon
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.

1647
node_modules/async/README.md generated vendored Normal file

File diff suppressed because it is too large Load diff

Some files were not shown because too many files have changed in this diff Show more