diff --git a/bower.json b/bower.json deleted file mode 100644 index 333e2cd..0000000 --- a/bower.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "ideesculture.github.io", - "description": "ideesculture global documentation portal", - "main": "index.html", - "authors": [ - "Gautier Michelin" - ], - "license": "© 2016 idéesculture", - "keywords": [ - "git", - "bootstrap", - "documentation", - "rtfm" - ], - "moduleType": [], - "homepage": "http://www.ideesculture.com", - "private": true, - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests" - ], - "dependencies": { - "bootstrap-sass": "~3.3.6", - "jquery": "~2.1.4", - "fontawesome": "~4.3.0", - "ubuntu-fontface": "^0.1.10" - } -} diff --git a/gulpfile.js b/gulpfile.js deleted file mode 100644 index 9a6a7a2..0000000 --- a/gulpfile.js +++ /dev/null @@ -1,60 +0,0 @@ -var gulp = require('gulp'), - sass = require('gulp-sass') -notify = require("gulp-notify") -bower = require('gulp-bower'); - -var config = { - sassPath: './assets/sass', - bowerDir: './bower_components' -} - -// Bootstrap scss source -var bootstrapSass = { - in: './bower_components/bootstrap-sass' -}; - -gulp.task('configuring bower', function() { - return bower() - .pipe(gulp.dest(config.bowerDir)) -}); - -gulp.task('copying fonts', function() { - gulp.src(config.bowerDir + '/fontawesome/fonts/**.*') - .pipe(gulp.dest('./assets/fonts')); - gulp.src(config.bowerDir + '/ubuntu-fontface/fonts/**.*') - .pipe(gulp.dest('./assets/fonts')); -}); - -gulp.task('copying javascript assets', function(){ - gulp.src([ - 'bower_components/bootstrap-sass/assets/javascripts/bootstrap.min.js', - 'bower_components/bootstrap-sass/assets/javascripts/bootstrap/transition.js', - 'bower_components/jquery-backgroundpos/src/jquery.backgroundpos.min.js', - ]) - .pipe(gulp.dest('assets/js')); -}); - -gulp.task('compiling sass stylesheets', function() { - return gulp.src(config.sassPath + '/style.scss') - .pipe(sass({ - outputStyle: 'nested', - precison: 3, - errLogToConsole: true, - includePaths: [ - config.bowerDir + '/bootstrap-sass/assets/stylesheets', - config.bowerDir + '/fontawesome/scss', - config.bowerDir + '/ubuntu-fontface', - ] - }) - .on("error", notify.onError(function (error) { - return "Error: " + error.message; - }))) - .pipe(gulp.dest('assets/css')); -}); - -// Rerun the task when a file changes -gulp.task('sass:watch', function() { - gulp.watch(config.sassPath + '/**/*.scss', ['sass']); -}); - -gulp.task('default', ['configuring bower','copying fonts','copying javascript assets', 'compiling sass stylesheets']); \ No newline at end of file diff --git a/node_modules/.DS_Store b/node_modules/.DS_Store deleted file mode 100644 index 1ee8181..0000000 Binary files a/node_modules/.DS_Store and /dev/null differ diff --git a/node_modules/vinyl-sourcemaps-apply/.jshintrc b/node_modules/vinyl-sourcemaps-apply/.jshintrc deleted file mode 100644 index 36a93d9..0000000 --- a/node_modules/vinyl-sourcemaps-apply/.jshintrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "node": true, - "strict": true -} \ No newline at end of file diff --git a/node_modules/vinyl-sourcemaps-apply/.npmignore b/node_modules/vinyl-sourcemaps-apply/.npmignore deleted file mode 100644 index 91dfed8..0000000 --- a/node_modules/vinyl-sourcemaps-apply/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -.DS_Store -node_modules \ No newline at end of file diff --git a/node_modules/vinyl-sourcemaps-apply/README.md b/node_modules/vinyl-sourcemaps-apply/README.md deleted file mode 100644 index b1d2c48..0000000 --- a/node_modules/vinyl-sourcemaps-apply/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# vinyl-sourcemaps-apply - -Apply a source map to a vinyl file, merging it with preexisting source maps. - -## Usage: - -```javascript -var applySourceMap = require('vinyl-sourcemaps-apply'); -applySourceMap(vinylFile, sourceMap); -``` - -### Example (Gulp plugin): - -```javascript -var through = require('through2'); -var applySourceMap = require('vinyl-sourcemaps-apply'); -var myTransform = require('myTransform'); - -module.exports = function(options) { - - function transform(file, encoding, callback) { - // generate source maps if plugin source-map present - if (file.sourceMap) { - options.makeSourceMaps = true; - } - - // do normal plugin logic - var result = myTransform(file.contents, options); - file.contents = new Buffer(result.code); - - // apply source map to the chain - if (file.sourceMap) { - applySourceMap(file, result.map); - } - - this.push(file); - callback(); - } - - return through.obj(transform); -}; -``` \ No newline at end of file diff --git a/node_modules/vinyl-sourcemaps-apply/index.js b/node_modules/vinyl-sourcemaps-apply/index.js deleted file mode 100644 index c966b80..0000000 --- a/node_modules/vinyl-sourcemaps-apply/index.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; -var SourceMapGenerator = require('source-map').SourceMapGenerator; -var SourceMapConsumer = require('source-map').SourceMapConsumer; - -module.exports = function applySourceMap(file, sourceMap) { - if (typeof sourceMap === 'string' || sourceMap instanceof String) { - sourceMap = JSON.parse(sourceMap); - } - - if (file.sourceMap && (typeof file.sourceMap === 'string' || file.sourceMap instanceof String)) { - file.sourceMap = JSON.parse(file.sourceMap); - } - - // check source map properties - assertProperty(sourceMap, "file"); - assertProperty(sourceMap, "mappings"); - assertProperty(sourceMap, "sources"); - - // fix paths if Windows style paths - sourceMap.file = sourceMap.file.replace(/\\/g, '/'); - sourceMap.sources = sourceMap.sources.map(function(filePath) { - return filePath.replace(/\\/g, '/'); - }); - - if (file.sourceMap && file.sourceMap.mappings !== '') { - var generator = SourceMapGenerator.fromSourceMap(new SourceMapConsumer(sourceMap)); - generator.applySourceMap(new SourceMapConsumer(file.sourceMap)); - file.sourceMap = JSON.parse(generator.toString()); - } else { - file.sourceMap = sourceMap; - } -}; - -function assertProperty(sourceMap, propertyName) { - if (!sourceMap.hasOwnProperty(propertyName)) { - var e = new Error('Source map to be applied is missing the \"' + propertyName + '\" property'); - throw e; - } -} diff --git a/node_modules/vinyl-sourcemaps-apply/package.json b/node_modules/vinyl-sourcemaps-apply/package.json deleted file mode 100644 index 23e65c2..0000000 --- a/node_modules/vinyl-sourcemaps-apply/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "_args": [ - [ - "vinyl-sourcemaps-apply@^0.2.0", - "/Users/gautier/git/bitbucket/spaycific-quizz/node_modules/gulp-sass" - ] - ], - "_from": "vinyl-sourcemaps-apply@>=0.2.0 <0.3.0", - "_id": "vinyl-sourcemaps-apply@0.2.1", - "_inCache": true, - "_installable": true, - "_location": "/vinyl-sourcemaps-apply", - "_nodeVersion": "0.12.7", - "_npmUser": { - "email": "florian.reiterer@gmail.com", - "name": "floridoo" - }, - "_npmVersion": "2.11.3", - "_phantomChildren": {}, - "_requested": { - "name": "vinyl-sourcemaps-apply", - "raw": "vinyl-sourcemaps-apply@^0.2.0", - "rawSpec": "^0.2.0", - "scope": null, - "spec": ">=0.2.0 <0.3.0", - "type": "range" - }, - "_requiredBy": [ - "/gulp-sass" - ], - "_resolved": "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz", - "_shasum": "ab6549d61d172c2b1b87be5c508d239c8ef87705", - "_shrinkwrap": null, - "_spec": "vinyl-sourcemaps-apply@^0.2.0", - "_where": "/Users/gautier/git/bitbucket/spaycific-quizz/node_modules/gulp-sass", - "author": { - "email": "me@florianreiterer.com", - "name": "Florian Reiterer" - }, - "bugs": { - "url": "https://github.com/floridoo/vinyl-sourcemaps-apply/issues" - }, - "dependencies": { - "source-map": "^0.5.1" - }, - "description": "Apply a source map to a vinyl file, merging it with preexisting source maps", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "ab6549d61d172c2b1b87be5c508d239c8ef87705", - "tarball": "http://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz" - }, - "gitHead": "30320c97c112f44ccba02dd73ce5bed1ad4361de", - "homepage": "http://github.com/floridoo/vinyl-sourcemaps-apply", - "keywords": [ - "gulp", - "source maps", - "sourcemaps", - "vinyl" - ], - "license": "ISC", - "main": "index.js", - "maintainers": [ - { - "name": "floridoo", - "email": "florian.reiterer@gmail.com" - } - ], - "name": "vinyl-sourcemaps-apply", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/floridoo/vinyl-sourcemaps-apply.git" - }, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "version": "0.2.1" -} diff --git a/node_modules/walk/.jshintrc b/node_modules/walk/.jshintrc deleted file mode 100644 index 406049c..0000000 --- a/node_modules/walk/.jshintrc +++ /dev/null @@ -1,14 +0,0 @@ -{ "node": true -, "browser": true -, "jquery": true - -, "onevar": true -, "laxcomma": true -, "laxbreak": true - -, "eqeqeq": true -, "immed": true -, "undef": true -, "unused": true -, "latedef": true -} diff --git a/node_modules/walk/.npmignore b/node_modules/walk/.npmignore deleted file mode 100644 index 05fd69b..0000000 --- a/node_modules/walk/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -walk-test diff --git a/node_modules/walk/LICENSE.APACHE2 b/node_modules/walk/LICENSE.APACHE2 deleted file mode 100644 index 9590215..0000000 --- a/node_modules/walk/LICENSE.APACHE2 +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2011 AJ ONeal - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/node_modules/walk/LICENSE.MIT b/node_modules/walk/LICENSE.MIT deleted file mode 100644 index 8f82133..0000000 --- a/node_modules/walk/LICENSE.MIT +++ /dev/null @@ -1,9 +0,0 @@ -MIT LICENSE - -Copyright (c) 2011 AJ ONeal - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/walk/README.md b/node_modules/walk/README.md deleted file mode 100644 index 189855a..0000000 --- a/node_modules/walk/README.md +++ /dev/null @@ -1,233 +0,0 @@ -node-walk -==== - -nodejs walk implementation. - -This is somewhat of a port python's `os.walk`, but using Node.JS conventions. - - * EventEmitter - * Asynchronous - * Chronological (optionally) - * Built-in flow-control - * includes Synchronous version (same API as Asynchronous) - -As few file descriptors are opened at a time as possible. -This is particularly well suited for single hard disks which are not flash or solid state. - -Installation ----- - - npm install walk - -Usage -==== - -Both Asynchronous and Synchronous versions are provided. - -```javascript -(function () { - "use strict"; - - var walk = require('walk') - , fs = require('fs') - , options - , walker - ; - - options = { - followLinks: false - // directories with these keys will be skipped - , filters: ["Temp", "_Temp"] - }; - - walker = walk.walk("/tmp", options); - - // OR - // walker = walk.walkSync("/tmp", options); - - walker.on("names", function (root, nodeNamesArray) { - nodeNamesArray.sort(function (a, b) { - if (a > b) return 1; - if (a < b) return -1; - return 0; - }); - }); - - walker.on("directories", function (root, dirStatsArray, next) { - // dirStatsArray is an array of `stat` objects with the additional attributes - // * type - // * error - // * name - - next(); - }); - - walker.on("file", function (root, fileStats, next) { - fs.readFile(fileStats.name, function () { - // doStuff - next(); - }); - }); - - walker.on("errors", function (root, nodeStatsArray, next) { - next(); - }); - - walker.on("end", function () { - console.log("all done"); - }); -}()); -``` - -### Sync - -Note: You **can't use EventEmitter** if you want truly synchronous walker -(although it's synchronous under the hood, it appears not to be due to the use of `process.nextTick()`). - -Instead **you must use `options.listeners`** for truly synchronous walker. - -Although the sync version uses all of the `fs.readSync`, `fs.readdirSync`, and other sync methods, -I don't think I can prevent the `process.nextTick()` that `EventEmitter` calls. - -```javascript -(function () { - "use strict"; - - var walk = require('walk') - , fs = require('fs') - , options - , walker - ; - - // To be truly synchronous in the emitter and maintain a compatible api, - // the listeners must be listed before the object is created - options = { - listeners: { - names: function (root, nodeNamesArray) { - nodeNames.sort(function (a, b) { - if (a > b) return 1; - if (a < b) return -1; - return 0; - }); - } - , directories: function (root, dirStatsArray, next) { - // dirStatsArray is an array of `stat` objects with the additional attributes - // * type - // * error - // * name - - next(); - } - , file: function (root, fileStats, next) { - fs.readFile(fileStats.name, function () { - // doStuff - next(); - }); - } - , errors: function (root, nodeStatsArray, next) { - next(); - } - } - }; - - walker = walk.walkSync("/tmp", options); - - console.log("all done"); -}()); -``` - -API -==== - -Emitted Values - - * `on('XYZ', function(root, stats, next) {})` - - * `root` - the containing the files to be inspected - * *stats[Array]* - a single `stats` object or an array with some added attributes - * type - 'file', 'directory', etc - * error - * name - the name of the file, dir, etc - * next - no more files will be read until this is called - -Single Events - fired immediately - - * `end` - No files, dirs, etc left to inspect - - * `directoryError` - Error when `fstat` succeeded, but reading path failed (Probably due to permissions). - * `nodeError` - Error `fstat` did not succeeded. - * `node` - a `stats` object for a node of any type - * `file` - includes links when `followLinks` is `true` - * Note: This feature is broken in the current version, but works in the previous `walk-recursive` version - * `directory` - * `symbolicLink` - always empty when `followLinks` is `true` - * `blockDevice` - * `characterDevice` - * `FIFO` - * `socket` - -Events with Array Arguments - fired after all files in the dir have been `stat`ed - - * `names` - before any `stat` takes place. Useful for sorting and filtering. - * Note: the array is an array of `string`s, not `stat` objects - * Note: the `next` argument is a `noop` - - * `errors` - errors encountered by `fs.stat` when reading ndes in a directory - * `nodes` - an array of `stats` of any type - * `files` - * `directories` - modification of this array - sorting, removing, etc - affects traversal - * `symbolicLinks` - * `blockDevices` - * `characterDevices` - * `FIFOs` - * `sockets` - -**Warning** beware of infinite loops when `followLinks` is true (using `walk-recurse` varient). - -Comparisons -==== - -Tested on my `/System` containing 59,490 (+ self) directories (and lots of files). -The size of the text output was 6mb. - -`find`: - time bash -c "find /System -type d | wc" - 59491 97935 6262916 - - real 2m27.114s - user 0m1.193s - sys 0m14.859s - -`find.js`: - -Note that `find.js` omits the start directory - - time bash -c "node examples/find.js /System -type d | wc" - 59490 97934 6262908 - - # Test 1 - real 2m52.273s - user 0m20.374s - sys 0m27.800s - - # Test 2 - real 2m23.725s - user 0m18.019s - sys 0m23.202s - - # Test 3 - real 2m50.077s - user 0m17.661s - sys 0m24.008s - -In conclusion node.js asynchronous walk is much slower than regular "find". - -LICENSE -=== - -`node-walk` is available under the following licenses: - - * MIT - * Apache 2 - -Copyright 2011 - Present AJ ONeal diff --git a/node_modules/walk/examples/walk-test.js b/node_modules/walk/examples/walk-test.js deleted file mode 100755 index d21f37a..0000000 --- a/node_modules/walk/examples/walk-test.js +++ /dev/null @@ -1,131 +0,0 @@ -#!/usr/bin/env node -(function () { - "use strict"; - - var walk = require('walk') - , count = 0 - , emitter - , saneCount = 0 - ; - - function sort(a,b) { - a= a.toLowerCase(); - b= b.toLowerCase(); - if (a > b) return -1; - if (a < b) return 1; - return 0; - } - - process.argv.forEach(function(startpath, index) { - if (index > 1) { - emitter = walk.walk(startpath); - - // Non-`stat`ed Nodes - emitter.on('name', function (path, file, stat) { - saneCount += 1; - //console.log( ["[", count, "] ", path, '/', file].join('') ) - //console.log( [path, '/', file].join('') ) - }); - emitter.on('names', function (path, files, stats) { - files.sort(sort); - //console.log('sort: ' + files.join(' ; ')); - }); - - - - // Single `stat`ed Nodes - emitter.on('error', function (path, err, next) { - next() - // ignore - }); - emitter.on('directoryError', function (path, stats, next) { - next(); - }); - emitter.on('nodeError', function (path, stats, next) { - next(); - }); - /* - emitter.on('node', function (path, stat, next) { - count += 1; - console.log( [path, '/', stat.name].join('') ) - //console.log( ["[", count, "] ", path, '/', stat.name].join('') ) - next(); - }); - */ - emitter.on('file', function (path, stat, next) { - count += 1; - console.log( [path, '/', stat.name].join('') ) - //console.log( ["[", count, "] ", path, '/', stat.name].join('') ) - next(); - }); - emitter.on('directory', function (path, stat, next) { - count += 1; - console.log( [path, '/', stat.name].join('') ) - next(); - }); - emitter.on('symbolicLink', function (path, stat, next) { - count += 1; - console.log( [path, '/', stat.name].join('') ) - next(); - }); - /* - emitter.on('blockDevice', function (path, stat, next) { - next(); - }); - emitter.on('characterDevice', function (path, stat, next) { - next(); - }); - emitter.on('FIFO', function (path, stat, next) { - next(); - }); - emitter.on('socket', function (path, stat, next) { - next(); - }); - */ - - - - // Grouped `stat`ed Nodes - emitter.on('errors', function (path, stats, next) { - next(); - }); - /* - emitter.on('nodes', function (path, stats, next) { - next(); - }); - */ - emitter.on('files', function (path, stats, next) { - next(); - }); - emitter.on('directories', function (path, stats, next) { - //delete stats[1]; - next(); - }); - emitter.on('symbolicLinks', function (path, stats, next) { - next(); - }); - /* - emitter.on('blockDevices', function (path, stats, next) { - next(); - }); - emitter.on('characterDevices', function (path, stats, next) { - next(); - }); - emitter.on('FIFOs', function (path, stats, next) { - next(); - }); - emitter.on('sockets', function (path, stats, next) { - next(); - }); - */ - - - - // The end of all things - emitter.on('end', function () { - console.log("The eagle has landed. [" + count + " == " + saneCount + "]"); - }); - } - }); - -}()); diff --git a/node_modules/walk/lib/node-type-emitter.js b/node_modules/walk/lib/node-type-emitter.js deleted file mode 100644 index 9a1e01c..0000000 --- a/node_modules/walk/lib/node-type-emitter.js +++ /dev/null @@ -1,89 +0,0 @@ -/*jshint strict:true node:true es5:true onevar:true laxcomma:true laxbreak:true*/ -(function () { - "use strict"; - - // "FIFO" isn't easy to convert to camelCase and back reliably - var isFnodeTypes = [ - "isFile", "isDirectory", "isSymbolicLink", "isBlockDevice", "isCharacterDevice", "isFIFO", "isSocket" - ], - fnodeTypes = [ - "file", "directory", "symbolicLink", "blockDevice", "characterDevice", "FIFO", "socket" - ], - fnodeTypesPlural = [ - "files", "directories", "symbolicLinks", "blockDevices", "characterDevices", "FIFOs", "sockets" - ]; - - - // - function createNodeGroups() { - var nodeGroups = {}; - fnodeTypesPlural.concat("nodes", "errors").forEach(function (fnodeTypePlural) { - nodeGroups[fnodeTypePlural] = []; - }); - return nodeGroups; - } - - - // Determine each file node's type - // - function sortFnodesByType(stat, fnodes) { - var i, isType; - - for (i = 0; i < isFnodeTypes.length; i += 1) { - isType = isFnodeTypes[i]; - if (stat[isType]()) { - stat.type = fnodeTypes[i]; - fnodes[fnodeTypesPlural[i]].push(stat); - return; - } - } - } - - - // Get the current number of listeners (which may change) - // Emit events to each listener - // Wait for all listeners to `next()` before continueing - // (in theory this may avoid disk thrashing) - function emitSingleEvents(emitter, path, stats, next, self) { - var num = 1 + emitter.listeners(stats.type).length + emitter.listeners("node").length; - - function nextWhenReady() { - num -= 1; - if (0 === num) { next.call(self); } - } - - emitter.emit(stats.type, path, stats, nextWhenReady); - emitter.emit("node", path, stats, nextWhenReady); - nextWhenReady(); - } - - - // Since the risk for disk thrashing among anything - // other than files is relatively low, all types are - // emitted at once, but all must complete before advancing - function emitPluralEvents(emitter, path, nodes, next, self) { - var num = 1; - - function nextWhenReady() { - num -= 1; - if (0 === num) { next.call(self); } - } - - fnodeTypesPlural.concat(["nodes", "errors"]).forEach(function (fnodeType) { - if (0 === nodes[fnodeType].length) { return; } - num += emitter.listeners(fnodeType).length; - emitter.emit(fnodeType, path, nodes[fnodeType], nextWhenReady); - }); - nextWhenReady(); - } - - module.exports = { - emitNodeType: emitSingleEvents, - emitNodeTypeGroups: emitPluralEvents, - isFnodeTypes: isFnodeTypes, - fnodeTypes: fnodeTypes, - fnodeTypesPlural: fnodeTypesPlural, - sortFnodesByType: sortFnodesByType, - createNodeGroups: createNodeGroups - }; -}()); diff --git a/node_modules/walk/lib/walk-async-only.js b/node_modules/walk/lib/walk-async-only.js deleted file mode 100644 index 319f5ec..0000000 --- a/node_modules/walk/lib/walk-async-only.js +++ /dev/null @@ -1,92 +0,0 @@ -(function () { - "use strict" - - // Array.prototype.forEachAsync(next, item, i, collection) - require('futures/forEachAsync'); - - function noop() {} - - var fs = require('fs'), - EventEmitter = require('events').EventEmitter, - TypeEmitter = require('./node-type-emitter'); - - // 2010-11-25 jorge@jorgechamorro.com - function create(pathname, cb) { - var emitter = new EventEmitter(), - q = [], - queue = [q], - curpath; - - function walk() { - fs.readdir(curpath, function(err, files) { - if (err) { - emitter.emit('directoryError', curpath, { error: err }, noop); - //emitter.emit('error', curpath, { error: err }); - } - // XXX bug was here. next() was omitted - if (!files || 0 == files.length) { - return next(); - } - - var fnodeGroups = TypeEmitter.createNodeGroups(); - - // TODO could allow user to selectively stat - // and don't stat if there are no stat listeners - emitter.emit('names', curpath, files, noop); - files.forEachAsync(function (cont, file) { - emitter.emit('name', curpath, file, noop); - fs.lstat(curpath + '/' + file, function (err, stat) { - stat = stat || {}; - stat.name = file; - if (err) { - stat.error = err; - //emitter.emit('error', curpath, stat); - emitter.emit('nodeError', curpath, stat, noop); - fnodeGroups.errors.push(stat); - cont(); - } else { - TypeEmitter.sortFnodesByType(stat, fnodeGroups); - TypeEmitter.emitNodeType(emitter, curpath, stat, cont); - } - }); - }).then(function () { - if (fnodeGroups.errors.length) { - emitter.emit('errors', curpath, fnodeGroups.errors, noop); - } - TypeEmitter.emitNodeTypeGroups(emitter, curpath, fnodeGroups, function () { - var dirs = []; - fnodeGroups.directories.forEach(function (stat) { - dirs.push(stat.name); - }); - dirs.forEach(fullPath); - queue.push(q = dirs); - next(); - }); - }); - }); - } - - function next() { - if (q.length) { - curpath = q.pop(); - return walk(); - } - if (queue.length -= 1) { - q = queue[queue.length-1]; - return next(); - } - emitter.emit('end'); - } - - function fullPath(v,i,o) { - o[i]= [curpath, '/', v].join(''); - } - - curpath = pathname; - walk(); - - return emitter; - } - - module.exports = create; -}()); diff --git a/node_modules/walk/lib/walk.js b/node_modules/walk/lib/walk.js deleted file mode 100644 index c4d3c72..0000000 --- a/node_modules/walk/lib/walk.js +++ /dev/null @@ -1,276 +0,0 @@ -// Adapted from work by jorge@jorgechamorro.com on 2010-11-25 -(function () { - "use strict"; - - function noop() {} - - var fs = require('fs') - , forEachAsync = require('foreachasync').forEachAsync - , EventEmitter = require('events').EventEmitter - , TypeEmitter = require('./node-type-emitter') - , util = require('util') - ; - - function appendToDirs(stat) { - /*jshint validthis:true*/ - this.push(stat.name); - } - - function wFilesHandlerWrapper(items) { - /*jshint validthis:true*/ - this._wFilesHandler(noop, items); - } - - function Walker(pathname, options, sync) { - EventEmitter.call(this); - - var me = this - ; - - options = options || {}; - me._wStat = options.followLinks && 'stat' || 'lstat'; - me._wStatSync = me._wStat + 'Sync'; - me._wsync = sync; - me._wq = []; - me._wqueue = [me._wq]; - me._wcurpath = undefined; - me._wfilters = options.filters || []; - me._wfirstrun = true; - me._wcurpath = pathname; - - if (me._wsync) { - //console.log('_walkSync'); - me._wWalk = me._wWalkSync; - } else { - //console.log('_walkASync'); - me._wWalk = me._wWalkAsync; - } - - options.listeners = options.listeners || {}; - Object.keys(options.listeners).forEach(function (event) { - var callbacks = options.listeners[event] - ; - - if ('function' === typeof callbacks) { - callbacks = [callbacks]; - } - - callbacks.forEach(function (callback) { - me.on(event, callback); - }); - }); - - me._wWalk(); - } - - // Inherits must come before prototype additions - util.inherits(Walker, EventEmitter); - - Walker.prototype._wLstatHandler = function (err, stat) { - var me = this - ; - - stat = stat || {}; - stat.name = me._wcurfile; - - if (err) { - stat.error = err; - //me.emit('error', curpath, stat); - me.emit('nodeError', me._wcurpath, stat, noop); - me._wfnodegroups.errors.push(stat); - me._wCurFileCallback(); - } else { - TypeEmitter.sortFnodesByType(stat, me._wfnodegroups); - // NOTE: wCurFileCallback doesn't need thisness, so this is okay - TypeEmitter.emitNodeType(me, me._wcurpath, stat, me._wCurFileCallback, me); - } - }; - Walker.prototype._wFilesHandler = function (cont, file) { - var statPath - , me = this - ; - - - me._wcurfile = file; - me._wCurFileCallback = cont; - me.emit('name', me._wcurpath, file, noop); - - statPath = me._wcurpath + '/' + file; - - if (!me._wsync) { - // TODO how to remove this anony? - fs[me._wStat](statPath, function (err, stat) { - me._wLstatHandler(err, stat); - }); - return; - } - - try { - me._wLstatHandler(null, fs[me._wStatSync](statPath)); - } catch(e) { - me._wLstatHandler(e); - } - }; - Walker.prototype._wOnEmitDone = function () { - var me = this - , dirs = [] - ; - - me._wfnodegroups.directories.forEach(appendToDirs, dirs); - dirs.forEach(me._wJoinPath, me); - me._wqueue.push(me._wq = dirs); - me._wNext(); - }; - Walker.prototype._wPostFilesHandler = function () { - var me = this - ; - - if (me._wfnodegroups.errors.length) { - me.emit('errors', me._wcurpath, me._wfnodegroups.errors, noop); - } - // XXX emitNodeTypes still needs refactor - TypeEmitter.emitNodeTypeGroups(me, me._wcurpath, me._wfnodegroups, me._wOnEmitDone, me); - }; - Walker.prototype._wReadFiles = function () { - var me = this - ; - - if (!me._wcurfiles || 0 === me._wcurfiles.length) { - return me._wNext(); - } - - // TODO could allow user to selectively stat - // and don't stat if there are no stat listeners - me.emit('names', me._wcurpath, me._wcurfiles, noop); - - if (me._wsync) { - me._wcurfiles.forEach(wFilesHandlerWrapper, me); - me._wPostFilesHandler(); - } else { - forEachAsync(me._wcurfiles, me._wFilesHandler, me).then(me._wPostFilesHandler); - } - }; - Walker.prototype._wReaddirHandler = function (err, files) { - var fnodeGroups = TypeEmitter.createNodeGroups() - , me = this - ; - - me._wfnodegroups = fnodeGroups; - me._wcurfiles = files; - - - if (!err) { - me._wReadFiles(); - return; - } - - if (!me._wfirstrun) { - me.emit('directoryError', me._wcurpath, { error: err }, noop); - me._wReadFiles(); - return; - } - - me._wfirstrun = false; - // TODO how to remove this anony? - fs[me._wStat](me._wcurpath, function (e, stat) { - - if (stat) { - files = [me._wcurpath.replace(/.*\//, '')]; - me._wcurpath = me._wcurpath.replace(files[0], ''); - } - - me._wReadFiles(); - }); - }; - Walker.prototype._wFilter = function () { - var me = this - , exclude - ; - - // Stop directories that contain filter keywords - // from continuing through the walk process - exclude = me._wfilters.some(function (filter) { - if (me._wcurpath.match(filter)) { - return true; - } - }); - - return exclude; - }; - Walker.prototype._wWalkSync = function () { - //console.log('walkSync'); - var err - , files - , me = this - ; - - try { - files = fs.readdirSync(me._wcurpath); - } catch(e) { - err = e; - } - - me._wReaddirHandler(err, files); - }; - Walker.prototype._wWalkAsync = function () { - //console.log('walkAsync'); - var me = this - ; - - // TODO how to remove this anony? - fs.readdir(me._wcurpath, function (err, files) { - me._wReaddirHandler(err, files); - }); - }; - Walker.prototype._wNext = function () { - var me = this - ; - - if (me._paused) { - return; - } - if (me._wq.length) { - me._wcurpath = me._wq.pop(); - while (me._wq.length && me._wFilter()) { - me._wcurpath = me._wq.pop(); - } - if (me._wcurpath && !me._wFilter()) { - me._wWalk(); - } else { - me._wNext(); - } - return; - } - me._wqueue.length -= 1; - if (me._wqueue.length) { - me._wq = me._wqueue[me._wqueue.length - 1]; - return me._wNext(); - } - - // To not break compatibility - //process.nextTick(function () { - me.emit('end'); - //}); - }; - Walker.prototype._wJoinPath = function (v, i, o) { - var me = this - ; - - o[i] = [me._wcurpath, '/', v].join(''); - }; - Walker.prototype.pause = function () { - this._paused = true; - }; - Walker.prototype.resume = function () { - this._paused = false; - this._wNext(); - }; - - exports.walk = function (path, opts) { - return new Walker(path, opts, false); - }; - - exports.walkSync = function (path, opts) { - return new Walker(path, opts, true); - }; -}()); diff --git a/node_modules/walk/old/examples/find-slowdown-test.js b/node_modules/walk/old/examples/find-slowdown-test.js deleted file mode 100644 index 8bc18d8..0000000 --- a/node_modules/walk/old/examples/find-slowdown-test.js +++ /dev/null @@ -1,33 +0,0 @@ -(function () { - var walk = require("../lib/walk.js"), - emit = walk(process.argv[2] || "/tmp"), - util = require('util'), - path = require('path'); - - // nor the root, nor the node should ever be empty - walk.fnodeTypesPlural.forEach(function (fnodeType) { - emit.on(fnodeType, function (root, nodes, next) { - if (!nodes || !nodes.length || !root) { - console.log(fnodeType, "empty set", root, nodes.length); //JSON.stringify(nodes)); - } - next(); - }); - }); - walk.fnodeTypes.forEach(function (fnodeType) { - emit.on(fnodeType, function (root, node, next) { - if (!node || !node.name || !root) { - console.log(fnodeType, "empty item", root, node.name); //JSON.stringify(node)); - } - next(); - }); - }); - emit.on('directory', function (root, dir, next) { - console.log(path.join(root, dir.name)); - setTimeout(next, 100); - }); - emit.on('file', function (root, file, next) { - console.log(path.join(root, file.name)); - setTimeout(next, 100); - }); -}()); - diff --git a/node_modules/walk/old/examples/find-test.js b/node_modules/walk/old/examples/find-test.js deleted file mode 100644 index e0132b8..0000000 --- a/node_modules/walk/old/examples/find-test.js +++ /dev/null @@ -1,38 +0,0 @@ -(function () { - var walk = require("../lib/walk.js"), - emit = walk(process.argv[2] || "/tmp"), - util = require('util'), - path = require('path'); - - // nor the root, nor the node should ever be empty - walk.fnodeTypesPlural.forEach(function (fnodeType) { - emit.on(fnodeType, function (root, nodes, next) { - if (!nodes || !nodes.length || !root) { - console.log(fnodeType, "empty set", root, nodes.length); //JSON.stringify(nodes)); - } - next(); - }); - }); - walk.fnodeTypes.forEach(function (fnodeType) { - emit.on(fnodeType, function (root, node, next) { - if (!node || !node.name || !root) { - console.log(fnodeType, "empty item", root, node.name); //JSON.stringify(node)); - } - next(); - }); - }); - emit.on('directory', function (root, dir, next) { - console.log(path.join(root, dir.name)); - next(); - }); - /* - emit.on('file', function (root, file, next) { - console.log(path.join(root, file.name)); - next(); - }); - */ - emit.on('end', function () { - console.log("All Done!"); - }); -}()); - diff --git a/node_modules/walk/old/examples/find.js b/node_modules/walk/old/examples/find.js deleted file mode 100644 index d44ceb8..0000000 --- a/node_modules/walk/old/examples/find.js +++ /dev/null @@ -1,30 +0,0 @@ -(function () { - var walk = require("../lib/walk.js"), - emit = walk(process.argv[2] || "/tmp"); - //icount = 0; - - emit.on('directories', function (path, dirs, next) { - dirs.forEach(function (dir) { - console.log(path + '/' + dir.name); - }); - next(); - }); - /* - emit.on('directory', function (path, file, next) { - //icount += 1; - console.log(path + '/' + file.name); // + " " + icount); - next(); - //process.nextTick(next); - //setTimeout(next, 100); - }); - emit.on('file', function (path, file, next) { - console.log("FILE:", file.name, "\n"); - next(); - }); - emit.on('directory', function (path, dir, next) { - console.log("DIR:", dir.name, "\n"); - next(); - }); - */ -}()); - diff --git a/node_modules/walk/old/examples/walk-array-emitters.js b/node_modules/walk/old/examples/walk-array-emitters.js deleted file mode 100755 index 988ccfb..0000000 --- a/node_modules/walk/old/examples/walk-array-emitters.js +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env node - -(function () { - var walk = require('../lib/walk').walk, - // todo remove(arr, obj, true), remove(arr, from, to) - remove = require('../lib/walk').remove, - util = require('util'); - - Array.prototype.removeAt = function (i) { - return this.splice(i, 1)[0]; - } - - var count = 0, emitter = walk('/System'); - emitter.on("directories", function (path, dirs) { - count += 1; - console.log('[' + count + '] REMOVED: ' + [path,dirs.splice(0,1).name].join('/')); - console.log(dirs); - }); - - emitter.on("files", function (path, files) { - count += 1; - console.log('[' + count + '] F:' + [path,files[0].name].join('/')); - console.log(files); - }); -}()); diff --git a/node_modules/walk/old/examples/walk-jqueue-2-test.js b/node_modules/walk/old/examples/walk-jqueue-2-test.js deleted file mode 100755 index 8fabaa8..0000000 --- a/node_modules/walk/old/examples/walk-jqueue-2-test.js +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env node -(function () { - "use strict"; - - var walk = require('../lib/walk-jqueue-2'), - count = 0; - - function sort(a,b) { - a= a.toLowerCase(); - b= b.toLowerCase(); - if (a > b) return -1; - if (a < b) return 1; - else return 0; - } - - process.argv.forEach(function(val, index, array) { - if (index > 1) { - emitter = walk(val); - emitter.on('name', function (path, file, stat) { - count += 1; - console.log( ["[", count, "] ", path, '/', file].join('') ) - }); - emitter.on('names', function (path, files, stats) { - files.sort(sort); - //console.log('sort: ' + files.join(' ; ')); - }); - emitter.on('error', function () { - // ignore - }); - emitter.on('stat', function (path, file, stat) { - //console.log('stat: ' + file); - }); - emitter.on('stats', function (path, files, stats) { - //console.log('stats: ' + files.join(' ; ')); - }); - emitter.on('end', function () { - console.log("The eagle has landed."); - }); - } - }); - -}()); diff --git a/node_modules/walk/old/examples/walk-jqueue-3-test.js b/node_modules/walk/old/examples/walk-jqueue-3-test.js deleted file mode 100755 index 965dd05..0000000 --- a/node_modules/walk/old/examples/walk-jqueue-3-test.js +++ /dev/null @@ -1,123 +0,0 @@ -#!/usr/bin/env node -(function () { - "use strict"; - - var walk = require('../lib/walk-jqueue-3'), - count = 0; - - function sort(a,b) { - a= a.toLowerCase(); - b= b.toLowerCase(); - if (a > b) return -1; - if (a < b) return 1; - else return 0; - } - - process.argv.forEach(function(startpath, index) { - if (index > 1) { - emitter = walk(startpath); - - // Non-`stat`ed Nodes - /* - emitter.on('name', function (path, file, stat) { - count += 1; - //console.log( ["[", count, "] ", path, '/', file].join('') ) - console.log( [path, '/', file].join('') ) - }); - emitter.on('names', function (path, files, stats) { - files.sort(sort); - //console.log('sort: ' + files.join(' ; ')); - }); - */ - - - // Single `stat`ed Nodes - emitter.on('error', function (path, err, next) { - // ignore - }); - emitter.on('directoryError', function (path, stats, next) { - next(); - }); - /* - emitter.on('node', function (path, stat, next) { - count += 1; - console.log( [path, '/', stat.name].join('') ) - //console.log( ["[", count, "] ", path, '/', stat.name].join('') ) - next(); - }); - */ - emitter.on('file', function (path, stat, next) { - count += 1; - console.log( [path, '/', stat.name].join('') ) - //console.log( ["[", count, "] ", path, '/', stat.name].join('') ) - next(); - }); - emitter.on('directory', function (path, stat, next) { - count += 1; - console.log( [path, '/', stat.name].join('') ) - next(); - }); - emitter.on('symbolicLink', function (path, stat, next) { - count += 1; - console.log( [path, '/', stat.name].join('') ) - next(); - }); - /* - */ - /* - emitter.on('blockDevice', function (path, stat, next) { - next(); - }); - emitter.on('characterDevice', function (path, stat, next) { - next(); - }); - emitter.on('FIFO', function (path, stat, next) { - next(); - }); - emitter.on('socket', function (path, stat, next) { - next(); - }); - */ - - // Grouped `stat`ed Nodes - emitter.on('errors', function (path, stats, next) { - next(); - }); - /* - emitter.on('nodes', function (path, stats, next) { - next(); - }); - */ - emitter.on('files', function (path, stats, next) { - next(); - }); - emitter.on('directories', function (path, stats, next) { - //delete stats[1]; - next(); - }); - emitter.on('symbolicLinks', function (path, stats, next) { - next(); - }); - /* - emitter.on('blockDevices', function (path, stats, next) { - next(); - }); - emitter.on('characterDevices', function (path, stats, next) { - next(); - }); - emitter.on('FIFOs', function (path, stats, next) { - next(); - }); - emitter.on('sockets', function (path, stats, next) { - next(); - }); - */ - - // The end of all things - emitter.on('end', function () { - console.log("The eagle has landed."); - }); - } - }); - -}()); diff --git a/node_modules/walk/old/examples/walk-older-version.js b/node_modules/walk/old/examples/walk-older-version.js deleted file mode 100644 index 15b22a8..0000000 --- a/node_modules/walk/old/examples/walk-older-version.js +++ /dev/null @@ -1 +0,0 @@ -require('../lib/walk')(); diff --git a/node_modules/walk/old/examples/walk-pythonic.js b/node_modules/walk/old/examples/walk-pythonic.js deleted file mode 100644 index f2a352e..0000000 --- a/node_modules/walk/old/examples/walk-pythonic.js +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env node - -(function () { - var walk = require('../lib/walk').walk, - remove = require('../lib/walk').remove, - util = require('util'), - emitter = walk('/System'), - whenever; - - whenever = function (cb, eb) { - emitter.whenever(function (err, path, errs, dirs, files, links) { - if (err || errs.length) { - eb(path, err, errs); - if (err) { return; } - } - cb(path, dirs, files.concat(links)); - }); - } - - // A much more pythonic style - whenever(function (path, dirs, files) { - console.log(path); - if (dirs.length) { - console.log(dirs); - } - if (files.length) { - console.log(files); - } - }, function (path, err, errs) { - util.debug(path); - if (err) { - util.debug(err); - } else if (errs.length) { - util.debug(errs); - } else { - throw new Error("No Error when Error Expected"); - } - }); -}()); diff --git a/node_modules/walk/old/examples/walk-singles-emitter.js b/node_modules/walk/old/examples/walk-singles-emitter.js deleted file mode 100755 index 5f7cd5e..0000000 --- a/node_modules/walk/old/examples/walk-singles-emitter.js +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env node - -(function () { - var walk = require('../lib/walk').walk, - // todo remove(arr, obj, true), remove(arr, from, to) - remove = require('../lib/walk').remove, - util = require('util'); - - Array.prototype.removeAt = function (i) { - return this.splice(i, 1)[0]; - } - - var count = 0, emitter = walk('/System'); - emitter.on("directory", function (path, stats) { - count += 1; - console.log('[' + count + '] D:' + [path,stats.name].join('/')); - }); - - emitter.on("file", function (path, stats) { - count += 1; - console.log('[' + count + '] F:' + [path,stats.name].join('/')); - }); -}()); diff --git a/node_modules/walk/old/examples/walk-whenever.js b/node_modules/walk/old/examples/walk-whenever.js deleted file mode 100755 index 757d72a..0000000 --- a/node_modules/walk/old/examples/walk-whenever.js +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env node - -(function () { - var walk = require('../lib/walk').walk, - // todo remove(arr, obj, true), remove(arr, from, to) - remove = require('../lib/walk').remove, - util = require('util'), - emitter = walk('/System'); - - emitter.whenever(function (err, path, errs, dirs, files, links, blocks, chars, fifos, sockets) { - // If there was an error reading the directory - // then we can return already - if (err) { - util.debug('ERROR reading path: ' + path + '\n' + util.inspect(err)); - return; - } - - // If there was an error `stat`ing a node - // then there may still be other nodes read successfully - if (errs) { - errs.forEach(function (err) { - util.debug('ERROR fs.stat node: ' + path + '\n' + util.inspect(err)); - }); - } - - // - dirs.forEach(function (item, i, arr) { - if (item.name.match(/trash/i)) { - console.log('REMOVE: found a trash'); - remove(arr, item); - } - }); - console.log("PATH: " + path); - console.log("FILES: " + util.inspect(files)); - }); - -}()); diff --git a/node_modules/walk/old/examples/walkq-test.js b/node_modules/walk/old/examples/walkq-test.js deleted file mode 100755 index 2fbc91c..0000000 --- a/node_modules/walk/old/examples/walkq-test.js +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env node -(function () { - var walk = require('../lib/walk-queue'), - emitter = walk(process.argv[2] || '.'), - _ = require('underscore'), - count = 0; - - emitter.on('error', function (err, path, files) { - console.log(err); - }); - emitter.on('nodes', function (path, files, next) { - //next(); - var filenames = _.map(files, function (file) { - return path + '/' + file; - }) - filenames.forEach(function (name) { - count += 1; - console.log('[' + count + '] ' + name) - }); - //filenames.forEach(console.log); - //console.log(_.pluck(files, 'name')); - }); - emitter.on('directories', function (path, files, next) { - next(); - }); - emitter.on('directory', function (path, stat, next) { - //console.log(stat.name); - next(); - }); - emitter.on('end', function () { - console.log("The eagle has landed"); - }); -}()); diff --git a/node_modules/walk/old/lib/walk-0.9.js b/node_modules/walk/old/lib/walk-0.9.js deleted file mode 100644 index ba63b57..0000000 --- a/node_modules/walk/old/lib/walk-0.9.js +++ /dev/null @@ -1,230 +0,0 @@ -(function () { - var fs = require('fs'), - Futures = require('futures'), - joinPath = require('path').join, - util = require('util'), - ev = require("events"), - emitter = new ev.EventEmitter(), - oneNodeEvent = [ - "file", - "directory", - "blockDevice", - "characterDevice", - "symbolicLink", - "fifo", - "socket" - ], - multiNodeEvents = [ - // multiple - "files", - "directories", - "blockDevices", - "characterDevices", - "symbolicLinks", - "fifos", - "sockets" - ], - eventsTpl = { - listeners: function () { return []; }, - next: function () { return; } - }, - events = {}, - nexts = {}; - - function newVersion() { - throw new Error("see README.md at http://github.com/coolaj86/node-walk"); - } - - function noop() { - } - - function remove(arr, obj) { - return arr.splice(arr.indexOf(obj), 1); - } - - oneNodeEvent.forEach(function (key) { - var e = events[key] = {}, next; - - Object.keys(eventsTpl).forEach(function (k) { - e[k] = eventsTpl[k](); - }); - - emitter.on("newListener", function (ev, listener) { - var count = 0, - num = e.listeners.length + 1; - - e.listeners.push(listener); - e.next = function (cb) { - cb = noop; - return function () { - if (count === num) { cb(); } - count += 1; - }; - }; - }); - - // TODO - next = function () { - - }; - }); - - function sortNodesByType(path, stats, o, cb) { - if (stats.isFile()) { - o.files.push(stats); - emitter.emit("file", path, stats, (nexts["file"]||noop)(cb)); - } else if (stats.isDirectory()) { - o.dirs.push(stats); - emitter.emit("directory", path, stats, function () { - remove(o.dirs, stats); - }, (nexts["directory"]||noop)(cb)); - } else if (stats.isBlockDevice()) { - o.blocks.push(stats); - emitter.emit("blockDevice", path, stats, (nexts["blockDevice"]||noop)(cb)); - } else if (stats.isCharacterDevice()) { - o.chars.push(stats); - emitter.emit("characterDevice", path, stats, (nexts["characterDevice"]||noop)(cb)); - } else if (stats.isSymbolicLink()) { - o.links.push(stats); - emitter.emit("symbolicLink", path, stats, (nexts["symbolicLink"]||noop)(cb)); - } else if (stats.isFIFO()) { - o.fifos.push(stats); - emitter.emit("fifo", path, stats, (nexts["fifo"]||noop)(cb)); - } else if (stats.isSocket()) { - o.sockets.push(stats); - emitter.emit("socket", path, stats, (nexts["socket"]||noop)(cb)); - } else { - // emitter.emit("error", stats); - util.debug(stats.name + 'is not of any node type'); - } - } - - /* - import os - from os.path import join, getsize - for root, dirs, files in os.walk('python/Lib/email'): - print root, "consumes", - print sum(getsize(join(root, name)) for name in files), - print "bytes in", len(files), "non-directory files" - if 'CVS' in dirs: - dirs.remove('CVS') # don't visit CVS directories - */ - - /* - fs.walk(path, function ({ err, root, dirs, files }) {}, { - // currently ignored - topdown: boolean, - onerror: boolean, // ignored - followLinks: boolean // lstat or stat - }); - */ - - function walk(firstPath, options, callback) { - options = options || {}; - var fstat = options.followLinks ? fs.stat : fs.lstat, - subscription = Futures.subscription(); - - if (callback) { subscription.subscribe(callback); } - - function readDir(path) { - var p = Futures.promise(); - - fs.readdir(path, function (err, files) { - if (err) { - err.path = path; - subscription.deliver(err, path); - // Signal the completion of this readdir attempt - p.fulfill(); - return; - } - - // TODO fix futures sequence to not require a first function like this - var s = Futures.sequence(function(n){n();}), - nodes = [], - o = { - errors: [], - dirs: [], - files: [], - links: [], - blocks: [], - chars: [], - fifos: [], - sockets: [] - }; - - files.forEach(function (file) { - // pushes onto the sequence stack without recursion - s.then(function (next) { - fstat(joinPath(path, file), function (err, stats) { - stats = stats || {}; - stats.name = file; - nodes.push(stats); - - if (err) { - stats.err = err; - o.errors.push(stats); - } else { - sortNodesByType(path, stats, o); - } - - next(); - }); - }); - }); - - s.then(function (next) { - var s2 = Futures.sequence(function(n){n();}); - if (nodes.length > 0) { - subscription.deliver(undefined, path, o.errors, o.dirs, o.files, o.links, o.blocks, o.chars, o.fifos, o.sockets); - if (o.errors.length > 0) { - emitter.emit("errors", path, o.errors); - } - if (o.dirs.length > 0) { - emitter.emit("directories", path, o.dirs); - } - if (o.files.length > 0) { - emitter.emit("files", path, o.files); - } - if (o.links.length > 0) { - emitter.emit("symbolicLinks", path, o.links); - } - if (o.blocks.length > 0) { - emitter.emit("blockDevices", path, o.blocks); - } - if (o.chars.length > 0) { - emitter.emit("characterDevices", path, o.chars); - } - if (o.fifos.length > 0) { - emitter.emit("fifos", path, o.fifos); - } - if (o.sockets.length > 0) { - emitter.emit("sockets", path, o.fifos); - } - p.fulfill(); - - o.dirs.forEach(function (dir) { - s2.then(function (next2) { - readDir(joinPath(path, dir.name)) - .when(function () { next2(); }); - }); - }); - - next(); - } - }); - - }); - - return p.passable(); - } - - readDir(firstPath) //.whenever(callback); - - emitter.whenever = subscription.subscribe; - return emitter; - } - - newVersion.walk = walk; - newVersion.remove = remove; - module.exports = newVersion; -}()); diff --git a/node_modules/walk/old/lib/walk-jorge.js b/node_modules/walk/old/lib/walk-jorge.js deleted file mode 100644 index 6146f1d..0000000 --- a/node_modules/walk/old/lib/walk-jorge.js +++ /dev/null @@ -1,61 +0,0 @@ -// 2011-11-25 jorge@jorgechamorro.com - -function walk (file, cb) { - var fs = require('fs'); - var q= []; - var queue= [q]; - walk2(); - - function walk2 () { - cb(file); - fs.lstat(file, function (err, stat) { - if (err || !stat.isDirectory()) return next(); - getDirectory(function (files) { - queue.push(q= files); - next(); - }); - }); - } - - function next () { - if (q.length) { - file= q.pop(); - walk2(); - } - else if (queue.length-= 1) { - q= queue[queue.length-1]; - next(); - } - } - - function getDirectory (cb) { - fs.readdir(file, function(err, files) { - // XXX bug was here. `next()` added by coolaj86 - if (!files) return next(); - //if (err) throw Error(err); - files.sort(sort); - files.forEach(fullPath); - cb(files); - }); - } - - function fullPath (v,i,o) { - o[i]= [file, '/', v].join(''); - } - - function sort (a,b) { - a= a.toLowerCase(); - b= b.toLowerCase(); - if (a > b) return -1; - if (a < b) return 1; - else return 0; - } -} - -// your callback here -var ctr= 0; -function callBack (file) { console.log( ["[", ++ctr, "] ", file].join('') ) }; - -process.argv.forEach(function(val, index, array) { - if (index > 1) walk(val, callBack); -}); diff --git a/node_modules/walk/old/lib/walk-jqueue-1.js b/node_modules/walk/old/lib/walk-jqueue-1.js deleted file mode 100644 index 00ed9d6..0000000 --- a/node_modules/walk/old/lib/walk-jqueue-1.js +++ /dev/null @@ -1,75 +0,0 @@ -(function () { - "use strict" - - var fs = require('fs'), - EventEmitter = require('events').EventEmitter; - - // 2010-11-25 jorge@jorgechamorro.com - function create (pathname, cb) { - var emitter = new EventEmitter(), - q = [], - queue = [q], - curpath; - - function walk() { - //cb(curpath); - fs.lstat(curpath, function (err, stat) { - if (err) { - emitter.emit('error', curpath, err); - } - if (!stat) { - return next(); - } - emitter.emit('node', curpath, stat); - if (!stat.isDirectory()) { - return next(); - } - fs.readdir(curpath, function(err, files) { - if (err) { - emitter.emit('error', curpath, err); - } - // XXX bug was here. next() was omitted - if (!files || 0 == files.length) { - return next(); - } - files.sort(sort); - emitter.emit('nodes', curpath, files); - files.forEach(fullPath); - queue.push(q = files); - next(); - }); - }); - } - - function next () { - if (q.length) { - curpath = q.pop(); - return walk(); - } - if (queue.length -= 1) { - q = queue[queue.length-1]; - return next(); - } - emitter.emit('end'); - } - - function fullPath(v,i,o) { - o[i]= [curpath, '/', v].join(''); - } - - function sort(a,b) { - a= a.toLowerCase(); - b= b.toLowerCase(); - if (a > b) return -1; - if (a < b) return 1; - else return 0; - } - - curpath = pathname; - walk(); - - return emitter; - } - - module.exports = create; -}()); diff --git a/node_modules/walk/old/lib/walk-jqueue-2.js b/node_modules/walk/old/lib/walk-jqueue-2.js deleted file mode 100644 index 00de986..0000000 --- a/node_modules/walk/old/lib/walk-jqueue-2.js +++ /dev/null @@ -1,79 +0,0 @@ -(function () { - "use strict" - - // Array.prototype.forEachAsync(next, item, i, collection) - require('futures/forEachAsync'); - - var fs = require('fs'), - EventEmitter = require('events').EventEmitter; - - // 2010-11-25 jorge@jorgechamorro.com - function create(pathname, cb) { - var emitter = new EventEmitter(), - q = [], - queue = [q], - curpath; - - function walk() { - fs.readdir(curpath, function(err, files) { - if (err) { - emitter.emit('error', curpath, err); - } - // XXX bug was here. next() was omitted - if (!files || 0 == files.length) { - return next(); - } - var stats = []; - emitter.emit('names', curpath, files, stats); - files.forEachAsync(function (cont, file) { - emitter.emit('name', curpath, file); - fs.lstat(curpath + '/' + file, function (err, stat) { - if (err) { - emitter.emit('error', curpath, err); - } - if (stat) { - stat.name = file; - stats.push(stat); - emitter.emit('stat', curpath, file, stat); - } - cont(); - }); - }).then(function () { - var dirs = [] - emitter.emit('stats', curpath, files, stats); - stats.forEach(function (stat) { - if (stat.isDirectory()) { - dirs.push(stat.name); - } - }); - dirs.forEach(fullPath); - queue.push(q = dirs); - next(); - }); - }); - } - - function next() { - if (q.length) { - curpath = q.pop(); - return walk(); - } - if (queue.length -= 1) { - q = queue[queue.length-1]; - return next(); - } - emitter.emit('end'); - } - - function fullPath(v,i,o) { - o[i]= [curpath, '/', v].join(''); - } - - curpath = pathname; - walk(); - - return emitter; - } - - module.exports = create; -}()); diff --git a/node_modules/walk/old/lib/walk-jqueue-3.js b/node_modules/walk/old/lib/walk-jqueue-3.js deleted file mode 100644 index 4903c7f..0000000 --- a/node_modules/walk/old/lib/walk-jqueue-3.js +++ /dev/null @@ -1,86 +0,0 @@ -(function () { - "use strict" - - // Array.prototype.forEachAsync(next, item, i, collection) - require('futures/forEachAsync'); - - var fs = require('fs'), - EventEmitter = require('events').EventEmitter, - TypeEmitter = require('./node-type-emitter'); - - // 2010-11-25 jorge@jorgechamorro.com - function create(pathname, cb) { - var emitter = new EventEmitter(), - q = [], - queue = [q], - curpath; - - function walk() { - fs.readdir(curpath, function(err, files) { - if (err) { - emitter.emit('error', curpath, err); - } - // XXX bug was here. next() was omitted - if (!files || 0 == files.length) { - return next(); - } - var stats = [], - fnodeGroups = TypeEmitter.createNodeGroups(); - - // TODO could allow user to selectively stat - // and don't stat if there are no stat listeners - emitter.emit('names', curpath, files); - files.forEachAsync(function (cont, file) { - emitter.emit('name', curpath, file); - fs.lstat(curpath + '/' + file, function (err, stat) { - if (err) { - emitter.emit('error', curpath, err); - } - if (!stat) { - cont(); - } - stat.name = file; - stats.push(stat); - //emitter.emit('stat', curpath, file, stat); - TypeEmitter.sortFnodesByType(stat, fnodeGroups); - TypeEmitter.emitNodeType(emitter, curpath, stat, cont); - }); - }).then(function () { - var dirs = [] - //emitter.emit('stats', curpath, files, stats); - TypeEmitter.emitNodeTypeGroups(emitter, curpath, fnodeGroups, function () { - fnodeGroups.directories.forEach(function (stat) { - dirs.push(stat.name); - }); - dirs.forEach(fullPath); - queue.push(q = dirs); - next(); - }); - }); - }); - } - - function next() { - if (q.length) { - curpath = q.pop(); - return walk(); - } - if (queue.length -= 1) { - q = queue[queue.length-1]; - return next(); - } - emitter.emit('end'); - } - - function fullPath(v,i,o) { - o[i]= [curpath, '/', v].join(''); - } - - curpath = pathname; - walk(); - - return emitter; - } - - module.exports = create; -}()); diff --git a/node_modules/walk/old/lib/walk-queue.js b/node_modules/walk/old/lib/walk-queue.js deleted file mode 100644 index a403066..0000000 --- a/node_modules/walk/old/lib/walk-queue.js +++ /dev/null @@ -1,165 +0,0 @@ -(function () { - "use strict"; - - var fs = require('fs'), - fstat = fs.lstat, - Futures = require('futures'), - EventEmitter = require('events').EventEmitter, - upath = require('path'), - // "FIFO" isn't easy to convert to camelCase and back reliably - isFnodeTypes = [ - "isFile", "isDirectory", "isBlockDevice", "isCharacterDevice", "isSymbolicLink", "isFIFO", "isSocket" - ], - fnodeTypes = [ - "file", "directory", "blockDevice", "characterDevice", "symbolicLink", "FIFO", "socket" - ], - fnodeTypesPlural = [ - "files", "directories", "blockDevices", "characterDevices", "symbolicLinks", "FIFOs", "sockets" - ]; - - // Get the current number of listeners (which may change) - // Emit events to each listener - // Wait for all listeners to `next()` before continueing - // (in theory this may avoid disk thrashing) - function emitSingleEvents(emitter, path, stats, next) { - var num = 1 + emitter.listeners(stats.type).length + emitter.listeners("node").length; - - function nextWhenReady() { - num -= 1; - if (0 === num) { next(); } - } - - emitter.emit(stats.type, path, stats, nextWhenReady); - emitter.emit("node", path, stats, nextWhenReady); - nextWhenReady(); - } - - - // Since the risk for disk thrashing among anything - // other than files is relatively low, all types are - // emitted at once, but all must complete before advancing - function emitPluralEvents(emitter, path, nodes, next) { - var num = 1; - - function nextWhenReady() { - num -= 1; - if (0 === num) { next(); } - } - - fnodeTypesPlural.concat(["nodes", "errors"]).forEach(function (fnodeType) { - if (0 === nodes[fnodeType].length) { return; } - num += emitter.listeners(fnodeType).length; - emitter.emit(fnodeType, path, nodes[fnodeType], nextWhenReady); - }); - nextWhenReady(); - } - - - // Determine each file node's type - // - function sortFnodesByType(stats, fnodes) { - isFnodeTypes.forEach(function (isType, i) { - if (stats[isType]()) { - if (stats.type) { throw new Error("is_" + type + " and " + isType); } - stats.type = fnodeTypes[i]; - fnodes[fnodeTypesPlural[i]].push(stats); - //console.log(isType, fnodeTypesPlural[i], stats.name); - // TODO throw to break; - } - }); - /* - // Won't really ever happen - if (!stats.type) { - stats.error = new Error(upath.join(path, stats.name) + ' isAnUndefinedType'); - } - */ - } - - function create(path) { - var emitter = new EventEmitter(), - paths = [], - path; - - function next() { - // path could be local if dirHandler were anonymous - //console.log('LEN: '+ paths.length); - if (0 == paths.length) { - emitter.emit('end'); - return; - } - path = paths.pop(); - //console.log("POP: " + path); - fs.readdir(path, dirHandler); - } - - function nodesHandler(nodes, args) { - //console.log('USE: ' + path); - var statses = []; - - var nodeGroups = {}; - fnodeTypesPlural.concat("nodes", "errors").forEach(function (fnodeTypePlural) { - nodeGroups[fnodeTypePlural] = []; - }); - - args.forEach(function (arg, i) { - var file = nodes[i], - err = arg[0], - stats = arg[1]; - - if (err) { - stats = { error: err, name: file }; - emitter.emit('error', err, path, stats); - } - if (stats) { - stats.name = file; - sortFnodesByType(stats, nodeGroups); - emitter.emit('stat', path, stats); - } - }); - emitter.emit('stats', path, statses); - nodeGroups['directories'].forEach(function (stat) { - paths.push(path + '/' + stat.name); - //console.log('PUSH: ' + path + '/' + stat.name); - }); - /* - //console.log('USE: ' + path); - next(); - */ - emitPluralEvents(emitter, path, nodeGroups, next); - } - - function dirHandler(err, nodes) { - //console.log("HANDLE: " + path); - var join = Futures.join(), - i; - - if (err) { - emitter.emit('error', err, path); - } - if (!nodes || 0 == nodes.length) { - //console.log('EMPTY: ' + path); - return next(); - } - // TODO don't duplicate efforts - emitter.emit('nodes', path, nodes); - - for (i = 0; i < nodes.length; i += 1) { - fstat(path + '/' + nodes[i], join.deliverer()); - } - - join.when(function () { - var args = Array.prototype.slice.call(arguments); - nodesHandler(nodes, args); - }); - } - - //paths.push([path]); - paths.push(path); - - - next(); - return emitter; - } - - module.exports = create; -}()); diff --git a/node_modules/walk/old/lib/walk-recurse.js b/node_modules/walk/old/lib/walk-recurse.js deleted file mode 100644 index be3bd5f..0000000 --- a/node_modules/walk/old/lib/walk-recurse.js +++ /dev/null @@ -1,165 +0,0 @@ -// TODO -// * add types by listener dynamically -// * unroll loops for better readability? -// * should emitted errors wait for `next()`? -(function (undefined) { - var fs = require('fs'), - upath = require('path'), - util = require('util'), - Futures = require('futures'), - events = require('events'), - noop = function () {}, - // "FIFO" isn't easy to convert to camelCame and back reliably - isFnodeTypes = [ - "isFile", "isDirectory", "isBlockDevice", "isCharacterDevice", "isSymbolicLink", "isFIFO", "isSocket" - ], - fnodeTypes = [ - "file", "directory", "blockDevice", "characterDevice", "symbolicLink", "FIFO", "socket" - ], - fnodeTypesPlural = [ - "files", "directories", "blockDevices", "characterDevices", "symbolicLinks", "FIFOs", "sockets" - ]; - - function newVersion() { - throw new Error("New Version. Please see API on github.com/coolaj86/node-walk"); - } - - // Create a new walk instance - function create(path, options, cb) { - if (cb) { - newVersion(); - } - - var emitter = new events.EventEmitter(), - fstat = (options||{}).followLinks ? fs.stat : fs.lstat; - - - // Get the current number of listeners (which may change) - // Emit events to each listener - // Wait for all listeners to `next()` before continueing - // (in theory this may avoid disk thrashing) - function emitSingleEvents(path, stats, next) { - var num = 1 + emitter.listeners(stats.type).length + emitter.listeners("node").length; - - function nextWhenReady() { - num -= 1; - if (0 === num) { next(); } - } - - emitter.emit(stats.type, path, stats, nextWhenReady); - emitter.emit("node", path, stats, nextWhenReady); - nextWhenReady(); - } - - - // Since the risk for disk thrashing among anything - // other than files is relatively low, all types are - // emitted at once, but all must complete before advancing - function emitPluralEvents(path, nodes, next) { - var num = 1; - - function nextWhenReady() { - num -= 1; - if (0 === num) { next(); } - } - - fnodeTypesPlural.concat(["nodes", "errors"]).forEach(function (fnodeType) { - if (0 === nodes[fnodeType].length) { return; } - num += emitter.listeners(fnodeType).length; - emitter.emit(fnodeType, path, nodes[fnodeType], nextWhenReady); - }); - nextWhenReady(); - } - - - // Determine each file node's type - // - function sortFnodesByType(path, stats, fnodes, nextFile) { - isFnodeTypes.forEach(function (isType, i) { - if (stats[isType]()) { - if (stats.type) { throw new Error("is_" + type + " and " + isType); } - stats.type = fnodeTypes[i]; - fnodes[fnodeTypesPlural[i]].push(stats); - // TODO throw to break; - } - }); - if (!stats.type) { throw new Error(upath.join(path, stats.name) + ' isAnUndefinedType'); } - emitSingleEvents(path, stats, nextFile); - } - - - // Asynchronously get the stats - // - function getStats(path, files, walkDirs) { - var nodeGroups = {}; - - fnodeTypesPlural.concat("nodes", "errors").forEach(function (fnodeTypePlural) { - nodeGroups[fnodeTypePlural] = []; - }); - - function nextFile() { - var file = files.pop(), dirs = [], fnames = []; - - if (undefined === file) { - emitPluralEvents(path, nodeGroups, function () { - nodeGroups.directories.forEach(function (dir) { - dirs.push(dir.name); - }); - walkDirs(dirs); - }); - return; - } - - fstat(upath.join(path, file), function (err, stats) { - stats = stats || {}; - stats.name = file; - nodeGroups.nodes.push(stats); - if (err) { - stats.error = err; - stats.type = 'error'; - nodeGroups.errors.push(stats); - //emitter.emit('fileError', path, stats, noop); - return nextFile(); - } - sortFnodesByType(path, stats, nodeGroups, nextFile); - }); - } - nextFile(); - } - - function walk(path, next) { - fs.readdir(path, function (err, nodes) { - if (err) { - emitter.emit('directoryError', path, { error: err, name: path }, noop); - return next(); /*TODO*/ throw err; - } - getStats(path, nodes, function (dirs) { - walkDirs(path, dirs, next); - }); - }); - } - - function walkDirs(path, dirs, cb) { - function nextDir() { - var dir = dirs.pop(); - if (undefined === dir) { - delete dirs; - return cb(); - } - walk(upath.join(path, dir), nextDir); - } - nextDir(); - } - - walk(upath.normalize(path), function () { - emitter.emit('end'); - }); - emitter.walk = newVersion; - emitter.whenever = newVersion; - return emitter; - } - module.exports = create; - module.exports.isFnodeTypes = isFnodeTypes; - module.exports.fnodeTypes = fnodeTypes; - module.exports.fnodeTypesPlural = fnodeTypesPlural; -}()); diff --git a/node_modules/walk/package.json b/node_modules/walk/package.json deleted file mode 100644 index 29f5ad9..0000000 --- a/node_modules/walk/package.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "_args": [ - [ - "walk@2.3.3", - "/Users/gautier/git/bitbucket/spaycific-quizz/node_modules/gulp-bower" - ] - ], - "_from": "walk@2.3.3", - "_id": "walk@2.3.3", - "_inCache": true, - "_installable": true, - "_location": "/walk", - "_npmUser": { - "email": "coolaj86@gmail.com", - "name": "coolaj86" - }, - "_npmVersion": "1.3.24", - "_phantomChildren": {}, - "_requested": { - "name": "walk", - "raw": "walk@2.3.3", - "rawSpec": "2.3.3", - "scope": null, - "spec": "2.3.3", - "type": "version" - }, - "_requiredBy": [ - "/gulp-bower" - ], - "_resolved": "https://registry.npmjs.org/walk/-/walk-2.3.3.tgz", - "_shasum": "b4c0e8c42464c16dbbe1d71666765eac07819e5f", - "_shrinkwrap": null, - "_spec": "walk@2.3.3", - "_where": "/Users/gautier/git/bitbucket/spaycific-quizz/node_modules/gulp-bower", - "author": { - "email": "coolaj86@gmail.com", - "name": "AJ ONeal" - }, - "bugs": { - "url": "https://github.com/coolaj86/node-walk/issues" - }, - "contributors": [], - "dependencies": { - "foreachasync": "3.x" - }, - "description": "A node port of python's os.walk", - "devDependencies": {}, - "directories": { - "example": "examples", - "test": "test" - }, - "dist": { - "shasum": "b4c0e8c42464c16dbbe1d71666765eac07819e5f", - "tarball": "http://registry.npmjs.org/walk/-/walk-2.3.3.tgz" - }, - "homepage": "https://github.com/coolaj86/node-walk", - "keywords": [ - "fs", - "os", - "sys", - "util", - "walk", - "walkSync" - ], - "lib": ".", - "licenses": [ - { - "type": "MIT", - "url": "http://www.opensource.org/licenses/mit-license.php" - }, - { - "type": "Apache2", - "url": "http://opensource.org/licenses/apache2.0.php" - } - ], - "main": "./lib/walk.js", - "maintainers": [ - { - "name": "coolaj86", - "email": "coolaj86@gmail.com" - } - ], - "name": "walk", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "url": "git://github.com/coolaj86/node-walk.git" - }, - "scripts": { - "test": "./test/walk-test.sh" - }, - "url": "http://github.com/coolaj86/node-walk", - "version": "2.3.3" -} diff --git a/node_modules/walk/profile/walk-test.js b/node_modules/walk/profile/walk-test.js deleted file mode 100755 index 8045a49..0000000 --- a/node_modules/walk/profile/walk-test.js +++ /dev/null @@ -1,129 +0,0 @@ -#!/usr/bin/env node -(function () { - "use strict"; - - var walk = require('../lib/walk'), - count = 0, - saneCount = 0; - - function sort(a,b) { - a= a.toLowerCase(); - b= b.toLowerCase(); - if (a > b) return -1; - if (a < b) return 1; - return 0; - } - - process.argv.forEach(function(startpath, index) { - if (index > 1) { - emitter = walk(startpath); - - // Non-`stat`ed Nodes - emitter.on('name', function (path, file, stat) { - saneCount += 1; - //console.log( ["[", count, "] ", path, '/', file].join('') ) - //console.log( [path, '/', file].join('') ) - }); - emitter.on('names', function (path, files, stats) { - files.sort(sort); - //console.log('sort: ' + files.join(' ; ')); - }); - - - - // Single `stat`ed Nodes - emitter.on('error', function (path, err, next) { - next() - // ignore - }); - emitter.on('directoryError', function (path, stats, next) { - next(); - }); - emitter.on('nodeError', function (path, stats, next) { - next(); - }); - /* - emitter.on('node', function (path, stat, next) { - count += 1; - console.log( [path, '/', stat.name].join('') ) - //console.log( ["[", count, "] ", path, '/', stat.name].join('') ) - next(); - }); - */ - emitter.on('file', function (path, stat, next) { - count += 1; - console.log( [path, '/', stat.name].join('') ) - //console.log( ["[", count, "] ", path, '/', stat.name].join('') ) - next(); - }); - emitter.on('directory', function (path, stat, next) { - count += 1; - console.log( [path, '/', stat.name].join('') ) - next(); - }); - emitter.on('symbolicLink', function (path, stat, next) { - count += 1; - console.log( [path, '/', stat.name].join('') ) - next(); - }); - /* - emitter.on('blockDevice', function (path, stat, next) { - next(); - }); - emitter.on('characterDevice', function (path, stat, next) { - next(); - }); - emitter.on('FIFO', function (path, stat, next) { - next(); - }); - emitter.on('socket', function (path, stat, next) { - next(); - }); - */ - - - - // Grouped `stat`ed Nodes - emitter.on('errors', function (path, stats, next) { - next(); - }); - /* - emitter.on('nodes', function (path, stats, next) { - next(); - }); - */ - emitter.on('files', function (path, stats, next) { - next(); - }); - emitter.on('directories', function (path, stats, next) { - //delete stats[1]; - next(); - }); - emitter.on('symbolicLinks', function (path, stats, next) { - next(); - }); - /* - emitter.on('blockDevices', function (path, stats, next) { - next(); - }); - emitter.on('characterDevices', function (path, stats, next) { - next(); - }); - emitter.on('FIFOs', function (path, stats, next) { - next(); - }); - emitter.on('sockets', function (path, stats, next) { - next(); - }); - */ - - - - // The end of all things - emitter.on('end', function () { - console.log("The eagle has landed. [" + count + " == " + saneCount + "]"); - }); - } - }); - -}()); diff --git a/node_modules/walk/test/find.js b/node_modules/walk/test/find.js deleted file mode 100644 index 83084f1..0000000 --- a/node_modules/walk/test/find.js +++ /dev/null @@ -1,7 +0,0 @@ - var exec = require('child_process').exec - , dirname = '/tmp/' // change to the dir you expect to have something during the test - ; - - exec('find ' + dirname, function (error, stdout, stderr) { - console.log(error, stdout, stderr); - }); diff --git a/node_modules/walk/test/test-walk.js b/node_modules/walk/test/test-walk.js deleted file mode 100644 index 65c725c..0000000 --- a/node_modules/walk/test/test-walk.js +++ /dev/null @@ -1,34 +0,0 @@ -(function () { - "use strict"; - - var walk = require('../lib/walk').walk - , path = require('path') - , dirname = process.argv[2] || './' - , walker - ; - - walker = walk(dirname); - - walker.on('directories', function (root, stats, next) { - stats.forEach(function (stat) { - console.log('[ds]', path.join(root, stat.name)); - }); - next(); - }); - - /* - walker.on('directory', function (root, stat, next) { - console.log('[d]', path.join(root, stat.name)); - next(); - }); - */ - - walker.on('file', function (root, stat, next) { - console.log('[f]', path.join(root, stat.name)); - next(); - }); - - walker.on('end', function () { - console.log('All Done!'); - }); -}()); diff --git a/node_modules/walk/test/testSync.js b/node_modules/walk/test/testSync.js deleted file mode 100644 index 189daef..0000000 --- a/node_modules/walk/test/testSync.js +++ /dev/null @@ -1,43 +0,0 @@ -(function () { - "use strict"; - - var walk = require('../lib/walk') - , fs = require('fs') - , options - , walker - ; - - options = { - listeners: { - names: function (root, nodeNamesArray) { - nodeNamesArray.sort(function (a, b) { - if (a > b) return 1; - if (a < b) return -1; - return 0; - }); - } - , directories: function (root, dirStatsArray, next) { - // dirStatsArray is an array of `stat` objects with the additional attributes - // * type - // * error - // * name - - next(); - } - , file: function (root, fileStats, next) { - fs.readFile(fileStats.name, function () { - // doStuff - console.log(root, fileStats.name); - next(); - }); - } - , errors: function (root, nodeStatsArray, next) { - next(); - } - } - }; - - walker = walk.walkSync("/tmp", options); - - console.log("all done"); -}()); diff --git a/node_modules/walk/test/walk-test.sh b/node_modules/walk/test/walk-test.sh deleted file mode 100755 index 4be671f..0000000 --- a/node_modules/walk/test/walk-test.sh +++ /dev/null @@ -1,6 +0,0 @@ -mkdir -p walk-test/dir1 -touch walk-test/file-0 -touch walk-test/file-1 -touch walk-test/dir1/file-2 -touch walk-test/dir1/file-3 -echo "4 files and 2 directories (including '.')" diff --git a/node_modules/which/.travis.yml b/node_modules/which/.travis.yml deleted file mode 100644 index 7f22ad5..0000000 --- a/node_modules/which/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -sudo: false -language: node_js -node_js: - - '0.10' - - '0.12' - - '4' diff --git a/node_modules/which/LICENSE b/node_modules/which/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/node_modules/which/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/which/README.md b/node_modules/which/README.md deleted file mode 100644 index 7f679d5..0000000 --- a/node_modules/which/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# which - -Like the unix `which` utility. - -Finds the first instance of a specified executable in the PATH -environment variable. Does not cache the results, so `hash -r` is not -needed when the PATH changes. - -## USAGE - -```javascript -var which = require('which') - -// async usage -which('node', function (er, resolvedPath) { - // er is returned if no "node" is found on the PATH - // if it is found, then the absolute path to the exec is returned -}) - -// sync usage -// throws if not found -var resolved = which.sync('node') - -// Pass options to override the PATH and PATHEXT environment vars. -which('node', { path: someOtherPath }, function (er, resolved) { - if (er) - throw er - console.log('found at %j', resolved) -}) -``` - -## CLI USAGE - -Same as the BSD `which(1)` binary. - -``` -usage: which [-as] program ... -``` - -## OPTIONS - -You may pass an options object as the second argument. - -- `path`: Use instead of the `PATH` environment variable. -- `pathExt`: Use instead of the `PATHEXT` environment variable. -- `all`: Return all matches, instead of just the first one. Note that - this means the function returns an array of strings instead of a - single string. diff --git a/node_modules/which/bin/which b/node_modules/which/bin/which deleted file mode 100755 index 7cee372..0000000 --- a/node_modules/which/bin/which +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env node -var which = require("../") -if (process.argv.length < 3) - usage() - -function usage () { - console.error('usage: which [-as] program ...') - process.exit(1) -} - -var all = false -var silent = false -var dashdash = false -var args = process.argv.slice(2).filter(function (arg) { - if (dashdash || !/^-/.test(arg)) - return true - - if (arg === '--') { - dashdash = true - return false - } - - var flags = arg.substr(1).split('') - for (var f = 0; f < flags.length; f++) { - var flag = flags[f] - switch (flag) { - case 's': - silent = true - break - case 'a': - all = true - break - default: - console.error('which: illegal option -- ' + flag) - usage() - } - } - return false -}) - -process.exit(args.reduce(function (pv, current) { - try { - var f = which.sync(current, { all: all }) - if (all) - f = f.join('\n') - if (!silent) - console.log(f) - return pv; - } catch (e) { - return 1; - } -}, 0)) diff --git a/node_modules/which/package.json b/node_modules/which/package.json deleted file mode 100644 index ceebbf1..0000000 --- a/node_modules/which/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "_args": [ - [ - "which@^1.2.0", - "/Users/gautier/git/bitbucket/spaycific-quizz/node_modules/cross-spawn-async" - ] - ], - "_from": "which@>=1.2.0 <2.0.0", - "_id": "which@1.2.1", - "_inCache": true, - "_installable": true, - "_location": "/which", - "_nodeVersion": "4.0.0", - "_npmUser": { - "email": "i@izs.me", - "name": "isaacs" - }, - "_npmVersion": "3.3.2", - "_phantomChildren": {}, - "_requested": { - "name": "which", - "raw": "which@^1.2.0", - "rawSpec": "^1.2.0", - "scope": null, - "spec": ">=1.2.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/cross-spawn-async", - "/node-gyp" - ], - "_resolved": "https://registry.npmjs.org/which/-/which-1.2.1.tgz", - "_shasum": "a010c43aade1a798a3e6c1b1e453d45cb497a2bc", - "_shrinkwrap": null, - "_spec": "which@^1.2.0", - "_where": "/Users/gautier/git/bitbucket/spaycific-quizz/node_modules/cross-spawn-async", - "author": { - "email": "i@izs.me", - "name": "Isaac Z. Schlueter", - "url": "http://blog.izs.me" - }, - "bin": { - "which": "./bin/which" - }, - "bugs": { - "url": "https://github.com/isaacs/node-which/issues" - }, - "dependencies": { - "is-absolute": "^0.1.7" - }, - "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", - "devDependencies": { - "mkdirp": "^0.5.0", - "rimraf": "^2.3.3", - "tap": "^2.0.0" - }, - "directories": {}, - "dist": { - "shasum": "a010c43aade1a798a3e6c1b1e453d45cb497a2bc", - "tarball": "http://registry.npmjs.org/which/-/which-1.2.1.tgz" - }, - "gitHead": "c3b472bd2e13a61a880eca44c76025920a4cb1d5", - "homepage": "https://github.com/isaacs/node-which#readme", - "license": "ISC", - "main": "which.js", - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "name": "which", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-which.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "version": "1.2.1" -} diff --git a/node_modules/which/test/basic.js b/node_modules/which/test/basic.js deleted file mode 100644 index 80e9e96..0000000 --- a/node_modules/which/test/basic.js +++ /dev/null @@ -1,99 +0,0 @@ -var t = require('tap') -var fs = require('fs') -var rimraf = require('rimraf') -var mkdirp = require('mkdirp') -var fixture = __dirname + '/fixture' -var which = require('../which.js') -var path = require('path') - -var isWindows = process.platform === 'win32' || - process.env.OSTYPE === 'cygwin' || - process.env.OSTYPE === 'msys' - -var skip = { skip: isWindows ? 'not relevant on windows' : false } - -t.test('setup', function (t) { - rimraf.sync(fixture) - mkdirp.sync(fixture) - fs.writeFileSync(fixture + '/foo.sh', 'echo foo\n') - t.end() -}) - -t.test('does not find non-executable', skip, function (t) { - t.plan(2) - - t.test('absolute', function (t) { - t.plan(2) - which(fixture + '/foo.sh', function (er) { - t.isa(er, Error) - }) - - t.throws(function () { - which.sync(fixture + '/foo.sh') - }) - }) - - t.test('with path', function (t) { - t.plan(2) - which('foo.sh', { path: fixture }, function (er) { - t.isa(er, Error) - }) - - t.throws(function () { - which.sync('foo.sh', { path: fixture }) - }) - }) -}) - -t.test('make executable', function (t) { - fs.chmodSync(fixture + '/foo.sh', '0755') - t.end() -}) - -t.test('find when executable', function (t) { - t.plan(4) - var opt = { pathExt: '.sh' } - var expect = path.resolve(fixture, 'foo.sh').toLowerCase() - var PATH = process.env.PATH - - t.test('absolute', function (t) { - runTest(fixture + '/foo.sh', t) - }) - - t.test('with process.env.PATH', function (t) { - process.env.PATH = fixture - runTest('foo.sh', t) - }) - - t.test('with process.env.Path', { - skip: isWindows ? false : 'Only for Windows' - }, function (t) { - process.env.PATH = "" - process.env.Path = fixture - runTest('foo.sh', t) - }) - - t.test('with path opt', function (t) { - opt.path = fixture - runTest('foo.sh', t) - }) - - function runTest(exec, t) { - t.plan(2) - which(exec, opt, function (er, found) { - if (er) - throw er - t.equal(found.toLowerCase(), expect) - process.env.PATH = PATH - }) - - var found = which.sync(exec, opt).toLowerCase() - t.equal(found, expect) - } - -}) - -t.test('clean', function (t) { - rimraf.sync(fixture) - t.end() -}) diff --git a/node_modules/which/test/bin.js b/node_modules/which/test/bin.js deleted file mode 100644 index ff7eb53..0000000 --- a/node_modules/which/test/bin.js +++ /dev/null @@ -1,119 +0,0 @@ -var t = require('tap') -var spawn = require('child_process').spawn -var node = process.execPath -var bin = require.resolve('../bin/which') - -function which (args, extraPath, cb) { - if (typeof extraPath === 'function') - cb = extraPath, extraPath = null - - var options = {} - if (extraPath) { - var sep = process.platform === 'win32' ? ';' : ':' - var p = process.env.PATH + sep + extraPath - options.env = Object.keys(process.env).reduce(function (env, k) { - if (!k.match(/^path$/i)) - env[k] = process.env[k] - return env - }, { PATH: p }) - } - - var out = '' - var err = '' - var child = spawn(node, [bin].concat(args), options) - child.stdout.on('data', function (c) { - out += c - }) - child.stderr.on('data', function (c) { - err += c - }) - child.on('close', function (code, signal) { - cb(code, signal, out.trim(), err.trim()) - }) -} - -t.test('finds node', function (t) { - which('node', function (code, signal, out, err) { - t.equal(signal, null) - t.equal(code, 0) - t.equal(err, '') - t.match(out, /[\\\/]node(\.exe)?$/) - t.end() - }) -}) - -t.test('does not find flergyderp', function (t) { - which('flergyderp', function (code, signal, out, err) { - t.equal(signal, null) - t.equal(code, 1) - t.equal(err, '') - t.match(out, '') - t.end() - }) -}) - -t.test('finds node and tap', function (t) { - which(['node', 'tap'], function (code, signal, out, err) { - t.equal(signal, null) - t.equal(code, 0) - t.equal(err, '') - t.match(out.split(/\n/), [ - /[\\\/]node(\.exe)?$/, - /[\\\/]tap(\.cmd)?$/ - ]) - t.end() - }) -}) - -t.test('finds node and tap, but not flergyderp', function (t) { - which(['node', 'flergyderp', 'tap'], function (code, signal, out, err) { - t.equal(signal, null) - t.equal(code, 1) - t.equal(err, '') - t.match(out.split(/\n/), [ - /[\\\/]node(\.exe)?$/, - /[\\\/]tap(\.cmd)?$/ - ]) - t.end() - }) -}) - -t.test('cli flags', function (t) { - var p = require('path').dirname(bin) - var cases = [ '-a', '-s', '-as', '-sa' ] - t.plan(cases.length) - cases.forEach(function (c) { - t.test(c, function (t) { - which(['which', c], p, function (code, signal, out, err) { - t.equal(signal, null) - t.equal(code, 0) - t.equal(err, '') - if (/s/.test(c)) - t.equal(out, '', 'should be silent') - else if (/a/.test(c)) - t.ok(out.split(/\n/).length > 1, 'should have more than 1 result') - t.end() - }) - }) - }) -}) - -t.test('shows usage', function (t) { - which([], function (code, signal, out, err) { - t.equal(signal, null) - t.equal(code, 1) - t.equal(err, 'usage: which [-as] program ...') - t.equal(out, '') - t.end() - }) -}) - -t.test('complains about unknown flag', function (t) { - which(['node', '-sax'], function (code, signal, out, err) { - t.equal(signal, null) - t.equal(code, 1) - t.equal(out, '') - t.equal(err, 'which: illegal option -- x\nusage: which [-as] program ...') - t.end() - }) -}) diff --git a/node_modules/which/which.js b/node_modules/which/which.js deleted file mode 100644 index e878351..0000000 --- a/node_modules/which/which.js +++ /dev/null @@ -1,137 +0,0 @@ -module.exports = which -which.sync = whichSync - -var isWindows = process.platform === 'win32' || - process.env.OSTYPE === 'cygwin' || - process.env.OSTYPE === 'msys' - -var path = require('path') -var COLON = isWindows ? ';' : ':' -var isExe -var fs = require('fs') -var isAbsolute = require('is-absolute') - -var G = parseInt('0010', 8) -var U = parseInt('0100', 8) -var UG = parseInt('0110', 8) - -if (isWindows) { - // On windows, there is no good way to check that a file is executable - isExe = function isExe () { return true } -} else { - isExe = function isExe (mod, uid, gid) { - var ret = (mod & 1) - || (mod & G) && process.getgid && gid === process.getgid() - || (mod & U) && process.getuid && uid === process.getuid() - || (mod & UG) && process.getuid && 0 === process.getuid() - - if (!ret && process.getgroups && (mod & G)) { - var groups = process.getgroups() - for (var g = 0; g < groups.length; g++) { - if (groups[g] === gid) - return true - } - } - - return ret - } -} - -function getPathInfo(cmd, opt) { - var colon = opt.colon || COLON - var pathEnv = opt.path || process.env.PATH || '' - var pathExt = [''] - - pathEnv = pathEnv.split(colon) - - if (isWindows) { - pathEnv.unshift(process.cwd()) - pathExt = (opt.pathExt || process.env.PATHEXT || '.EXE').split(colon) - if (cmd.indexOf('.') !== -1 && pathExt[0] !== '') - pathExt.unshift('') - } - - // If it's absolute, then we don't bother searching the pathenv. - // just check the file itself, and that's it. - if (isAbsolute(cmd)) - pathEnv = [''] - - return {env: pathEnv, ext: pathExt} -} - -function which (cmd, opt, cb) { - if (typeof opt === 'function') { - cb = opt - opt = {} - } - - var info = getPathInfo(cmd, opt) - var pathEnv = info.env - var pathExt = info.ext - var found = [] - - ;(function F (i, l) { - if (i === l) { - if (opt.all && found.length) - return cb(null, found) - else - return cb(new Error('not found: '+cmd)) - } - - var pathPart = pathEnv[i] - if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') - pathPart = pathPart.slice(1, -1) - - var p = path.resolve(pathPart, cmd) - ;(function E (ii, ll) { - if (ii === ll) return F(i + 1, l) - var ext = pathExt[ii] - fs.stat(p + ext, function (er, stat) { - if (!er && - stat.isFile() && - isExe(stat.mode, stat.uid, stat.gid)) { - if (opt.all) - found.push(p + ext) - else - return cb(null, p + ext) - } - return E(ii + 1, ll) - }) - })(0, pathExt.length) - })(0, pathEnv.length) -} - -function whichSync (cmd, opt) { - opt = opt || {} - - var info = getPathInfo(cmd, opt) - var pathEnv = info.env - var pathExt = info.ext - var found = [] - - for (var i = 0, l = pathEnv.length; i < l; i ++) { - var pathPart = pathEnv[i] - if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') - pathPart = pathPart.slice(1, -1) - - var p = path.join(pathPart, cmd) - for (var j = 0, ll = pathExt.length; j < ll; j ++) { - var cur = p + pathExt[j] - var stat - try { - stat = fs.statSync(cur) - if (stat.isFile() && isExe(stat.mode, stat.uid, stat.gid)) { - if (opt.all) - found.push(cur) - else - return cur - } - } catch (ex) {} - } - } - - if (opt.all && found.length) - return found - - throw new Error('not found: '+cmd) -} diff --git a/node_modules/window-size/LICENSE b/node_modules/window-size/LICENSE deleted file mode 100644 index 65f90ac..0000000 --- a/node_modules/window-size/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -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. diff --git a/node_modules/window-size/README.md b/node_modules/window-size/README.md deleted file mode 100644 index 0985bd6..0000000 --- a/node_modules/window-size/README.md +++ /dev/null @@ -1,45 +0,0 @@ -# window-size [![NPM version](https://badge.fury.io/js/window-size.svg)](http://badge.fury.io/js/window-size) [![Build Status](https://travis-ci.org/jonschlinkert/window-size.svg)](https://travis-ci.org/jonschlinkert/window-size) - -> Reliable way to to get the height and width of the terminal/console in a node.js environment. - -## Install - -Install with [npm](https://www.npmjs.com/) - -```sh -$ npm i window-size --save -``` - -## Usage - -```js -var size = require('window-size'); -size.height; // "25" (rows) -size.width; // "80" (columns) -``` - -## Other projects - -* [base-cli](https://www.npmjs.com/package/base-cli): Plugin for base-methods that maps built-in methods to CLI args (also supports methods from a… [more](https://www.npmjs.com/package/base-cli) | [homepage](https://github.com/jonschlinkert/base-cli) -* [lint-deps](https://www.npmjs.com/package/lint-deps): CLI tool that tells you when dependencies are missing from package.json and offers you a… [more](https://www.npmjs.com/package/lint-deps) | [homepage](https://github.com/jonschlinkert/lint-deps) -* [yargs](https://www.npmjs.com/package/yargs): Light-weight option parsing with an argv hash. No optstrings attached. | [homepage](https://github.com/bcoe/yargs#readme) - -## Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/window-size/issues/new). - -## Author - -**Jon Schlinkert** - -+ [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License - -Copyright © 2014-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 November 15, 2015._ \ No newline at end of file diff --git a/node_modules/window-size/cli.js b/node_modules/window-size/cli.js deleted file mode 100755 index dd8d0e5..0000000 --- a/node_modules/window-size/cli.js +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env node -'use strict'; -var helpText = ['Usage', -' $ window-size', -'', -'Example', -' $ window-size', -' height: 40 ', -' width : 145', -''].join('\n'); - -function showSize () { - var size = require('./'); - console.log('height: ' + size.height); - console.log('width : ' + size.width); -} - -if (process.argv.length > 2) { - switch (process.argv[2]) { - case 'help': - case '--help': - case '-h': - console.log(helpText); - break; - default: - showSize(); - } -} else { - showSize(); -} diff --git a/node_modules/window-size/index.js b/node_modules/window-size/index.js deleted file mode 100644 index eba89c9..0000000 --- a/node_modules/window-size/index.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -/*! - * window-size - * - * Copyright (c) 2014-2015 Jon Schlinkert - * Licensed under the MIT license. - */ - -var tty = require('tty'); - -module.exports = (function () { - var width; - var height; - - if (tty.isatty(1) && tty.isatty(2)) { - if (process.stdout.getWindowSize) { - width = process.stdout.getWindowSize(1)[0]; - height = process.stdout.getWindowSize(1)[1]; - } else if (tty.getWindowSize) { - width = tty.getWindowSize()[1]; - height = tty.getWindowSize()[0]; - } else if (process.stdout.columns && process.stdout.rows) { - height = process.stdout.columns; - width = process.stdout.rows; - } - } else { - Error('window-size could not get size with tty or process.stdout.'); - } - - return {height: height, width: width}; -})(); diff --git a/node_modules/window-size/package.json b/node_modules/window-size/package.json deleted file mode 100644 index 58e1204..0000000 --- a/node_modules/window-size/package.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "_args": [ - [ - "window-size@^0.1.4", - "/Users/gautier/git/bitbucket/spaycific-quizz/node_modules/yargs" - ] - ], - "_from": "window-size@>=0.1.4 <0.2.0", - "_id": "window-size@0.1.4", - "_inCache": true, - "_installable": true, - "_location": "/window-size", - "_nodeVersion": "5.0.0", - "_npmUser": { - "email": "github@sellside.com", - "name": "jonschlinkert" - }, - "_npmVersion": "3.3.6", - "_phantomChildren": {}, - "_requested": { - "name": "window-size", - "raw": "window-size@^0.1.4", - "rawSpec": "^0.1.4", - "scope": null, - "spec": ">=0.1.4 <0.2.0", - "type": "range" - }, - "_requiredBy": [ - "/yargs" - ], - "_resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", - "_shasum": "f8e1aa1ee5a53ec5bf151ffa09742a6ad7697876", - "_shrinkwrap": null, - "_spec": "window-size@^0.1.4", - "_where": "/Users/gautier/git/bitbucket/spaycific-quizz/node_modules/yargs", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bin": { - "window-size": "cli.js" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/window-size/issues" - }, - "dependencies": {}, - "description": "Reliable way to to get the height and width of the terminal/console in a node.js environment.", - "devDependencies": { - "semistandard": "^7.0.2", - "tap": "^2.2.1" - }, - "directories": {}, - "dist": { - "shasum": "f8e1aa1ee5a53ec5bf151ffa09742a6ad7697876", - "tarball": "http://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz" - }, - "engines": { - "node": ">= 0.10.0" - }, - "files": [ - "cli.js", - "index.js" - ], - "gitHead": "619d0da99254adc5c6059c84e3ec2b24564add46", - "homepage": "https://github.com/jonschlinkert/window-size", - "keywords": [ - "console", - "height", - "resize", - "size", - "terminal", - "tty", - "width", - "window" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "jonschlinkert", - "email": "github@sellside.com" - }, - { - "name": "doowb", - "email": "brian.woodward@gmail.com" - } - ], - "name": "window-size", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/window-size.git" - }, - "scripts": { - "pretest": "semistandard", - "test": "tap --coverage test.js" - }, - "verb": { - "related": { - "list": [ - "base-cli", - "lint-deps", - "yargs" - ] - } - }, - "version": "0.1.4" -} diff --git a/node_modules/wrap-ansi/index.js b/node_modules/wrap-ansi/index.js deleted file mode 100644 index bfd2333..0000000 --- a/node_modules/wrap-ansi/index.js +++ /dev/null @@ -1,155 +0,0 @@ -'use strict'; -var stringWidth = require('string-width'); - -var ESCAPES = [ - '\u001b', - '\u009b' -]; - -var END_CODE = 39; - -var ESCAPE_CODES = { - 0: 0, - 1: 22, - 2: 22, - 3: 23, - 4: 24, - 7: 27, - 8: 28, - 9: 29, - 30: 39, - 31: 39, - 32: 39, - 33: 39, - 34: 39, - 35: 39, - 36: 39, - 37: 39, - 90: 39, - 40: 49, - 41: 49, - 42: 49, - 43: 49, - 44: 49, - 45: 49, - 46: 49, - 47: 49 -}; - -function wrapAnsi(code) { - return ESCAPES[0] + '[' + code + 'm'; -} - -// calculate the length of words split on ' ', ignoring -// the extra characters added by ansi escape codes. -function wordLengths(str) { - return str.split(' ').map(function (s) { - return stringWidth(s); - }); -} - -// wrap a long word across multiple rows. -// ansi escape codes do not count towards length. -function wrapWord(rows, word, cols) { - var insideEscape = false; - var visible = rows[rows.length - 1].length; - - for (var i = 0; i < word.length; i++) { - var x = word[i]; - - rows[rows.length - 1] += x; - - if (ESCAPES.indexOf(x) !== -1) { - insideEscape = true; - } else if (insideEscape && x === 'm') { - insideEscape = false; - continue; - } - - if (insideEscape) { - continue; - } - - visible++; - - if (visible >= cols && i < word.length - 1) { - rows.push(''); - visible = 0; - } - } - - // it's possible that the last row we copy over is only - // ansi escape characters, handle this edge-case. - if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) { - rows[rows.length - 2] += rows.pop(); - } -} - -// the wrap-ansi module can be invoked -// in either 'hard' or 'soft' wrap mode. -// -// 'hard' will never allow a string to take up more -// than cols characters. -// -// 'soft' allows long words to expand past the column length. -module.exports = function (str, cols, opts) { - var options = opts || {}; - - var pre = ''; - var ret = ''; - var escapeCode; - - var lengths = wordLengths(str); - var words = str.split(' '); - var rows = ['']; - - for (var i = 0, word; (word = words[i]) !== undefined; i++) { - var rowLength = stringWidth(rows[rows.length - 1]); - - if (rowLength) { - rows[rows.length - 1] += ' '; - rowLength++; - } - - // in 'hard' wrap mode, the length of a line is - // never allowed to extend past 'cols'. - if (lengths[i] > cols && options.hard) { - if (rowLength) { - rows.push(''); - } - wrapWord(rows, word, cols); - continue; - } - - if (rowLength + lengths[i] > cols && rowLength > 0) { - rows.push(''); - } - - rows[rows.length - 1] += word; - } - - pre = rows.map(function (r) { - return r.trim(); - }).join('\n'); - - for (var j = 0; j < pre.length; j++) { - var y = pre[j]; - - ret += y; - - if (ESCAPES.indexOf(y) !== -1) { - var code = parseFloat(/[0-9][^m]*/.exec(pre.slice(j, j + 4))); - escapeCode = code === END_CODE ? null : code; - } - - if (escapeCode && ESCAPE_CODES[escapeCode]) { - if (pre[j + 1] === '\n') { - ret += wrapAnsi(ESCAPE_CODES[escapeCode]); - } else if (y === '\n') { - ret += wrapAnsi(escapeCode); - } - } - } - - return ret; -}; diff --git a/node_modules/wrap-ansi/license b/node_modules/wrap-ansi/license deleted file mode 100644 index 654d0bf..0000000 --- a/node_modules/wrap-ansi/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (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. diff --git a/node_modules/wrap-ansi/package.json b/node_modules/wrap-ansi/package.json deleted file mode 100644 index 37a6eee..0000000 --- a/node_modules/wrap-ansi/package.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "_args": [ - [ - "wrap-ansi@^1.0.0", - "/Users/gautier/git/bitbucket/spaycific-quizz/node_modules/cliui" - ] - ], - "_from": "wrap-ansi@>=1.0.0 <2.0.0", - "_id": "wrap-ansi@1.0.0", - "_inCache": true, - "_installable": true, - "_location": "/wrap-ansi", - "_nodeVersion": "1.1.0", - "_npmUser": { - "email": "bencoe@gmail.com", - "name": "bcoe" - }, - "_npmVersion": "3.3.6", - "_phantomChildren": {}, - "_requested": { - "name": "wrap-ansi", - "raw": "wrap-ansi@^1.0.0", - "rawSpec": "^1.0.0", - "scope": null, - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/cliui" - ], - "_resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-1.0.0.tgz", - "_shasum": "f573bb9ee23cf43891f3362f5f359a1dfa38fc34", - "_shrinkwrap": null, - "_spec": "wrap-ansi@^1.0.0", - "_where": "/Users/gautier/git/bitbucket/spaycific-quizz/node_modules/cliui", - "author": { - "email": "sindresorhus@gmail.com", - "name": "Sindre Sorhus", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/chalk/wrap-ansi/issues" - }, - "dependencies": { - "string-width": "^1.0.1" - }, - "description": "Wordwrap a string with ANSI escape codes", - "devDependencies": { - "ava": "0.0.4", - "chalk": "^1.1.0", - "coveralls": "^2.11.4", - "has-ansi": "^2.0.0", - "nyc": "^3.2.2", - "strip-ansi": "^3.0.0", - "xo": "*" - }, - "directories": {}, - "dist": { - "shasum": "f573bb9ee23cf43891f3362f5f359a1dfa38fc34", - "tarball": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-1.0.0.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "c890e95ea671779012fa73fd77b74198e8c5d09b", - "homepage": "https://github.com/chalk/wrap-ansi#readme", - "keywords": [ - "256", - "ansi", - "break", - "cli", - "color", - "colors", - "colour", - "command-line", - "console", - "escape", - "formatting", - "linewrap", - "log", - "logging", - "rgb", - "shell", - "string", - "styles", - "terminal", - "text", - "tty", - "wordbreak", - "wordwrap", - "wrap", - "xterm" - ], - "license": "MIT", - "maintainers": [ - { - "name": "bcoe", - "email": "ben@npmjs.com" - }, - { - "name": "jbnicolai", - "email": "jappelman@xebia.com" - }, - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "name": "wrap-ansi", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/wrap-ansi.git" - }, - "scripts": { - "coverage": "nyc --reporter=text-lcov node test.js | coveralls", - "test": "xo && nyc node test.js" - }, - "version": "1.0.0" -} diff --git a/node_modules/wrap-ansi/readme.md b/node_modules/wrap-ansi/readme.md deleted file mode 100644 index f2e0a6a..0000000 --- a/node_modules/wrap-ansi/readme.md +++ /dev/null @@ -1,63 +0,0 @@ -# wrap-ansi [![Build Status](https://travis-ci.org/chalk/wrap-ansi.svg?branch=master)](https://travis-ci.org/chalk/wrap-ansi) [![Coverage Status](https://coveralls.io/repos/chalk/wrap-ansi/badge.svg?branch=master&service=github)](https://coveralls.io/github/chalk/wrap-ansi?branch=master) - -> Wordwrap a string with [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) - - -## Install - -``` -$ npm install --save wrap-ansi -``` - - -## Usage - -```js -const chalk = require('chalk'); -const wrapAnsi = require('wrap-ansi'); - -const input = 'The quick brown ' + chalk.red('fox jumped over ') + - 'the lazy ' + chalk.green('dog and then ran away with the unicorn.'); - -console.log(wrapAnsi(input, 20)); -``` - - - - -## API - -### wrapAnsi(input, columns, [options]) - -Wrap words to the specified column width. - -#### input - -Type: `string` - -String with ANSI escape codes. Like one styled by [`chalk`](https://github.com/chalk/chalk). - -#### columns - -Type: `number` - -Number of columns to wrap the text to. - -#### options.hard - -Type: `boolean` -Default: `false` - -By default the wrap is soft, meaning long words may extend past the column width. Setting this to `true` will make it hard wrap at the column width. - - -## Related - -- [slice-ansi](https://github.com/chalk/slice-ansi) - Slice a string with ANSI escape codes -- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right -- [jsesc](https://github.com/mathiasbynens/jsesc) - Generate ASCII-only output from Unicode strings. Useful for creating test fixtures. - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/wrappy/LICENSE b/node_modules/wrappy/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/node_modules/wrappy/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/wrappy/README.md b/node_modules/wrappy/README.md deleted file mode 100644 index 98eab25..0000000 --- a/node_modules/wrappy/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# wrappy - -Callback wrapping utility - -## USAGE - -```javascript -var wrappy = require("wrappy") - -// var wrapper = wrappy(wrapperFunction) - -// make sure a cb is called only once -// See also: http://npm.im/once for this specific use case -var once = wrappy(function (cb) { - var called = false - return function () { - if (called) return - called = true - return cb.apply(this, arguments) - } -}) - -function printBoo () { - console.log('boo') -} -// has some rando property -printBoo.iAmBooPrinter = true - -var onlyPrintOnce = once(printBoo) - -onlyPrintOnce() // prints 'boo' -onlyPrintOnce() // does nothing - -// random property is retained! -assert.equal(onlyPrintOnce.iAmBooPrinter, true) -``` diff --git a/node_modules/wrappy/package.json b/node_modules/wrappy/package.json deleted file mode 100644 index de3c6d8..0000000 --- a/node_modules/wrappy/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "_args": [ - [ - "wrappy@1", - "/Users/gautier/git/bitbucket/spaycific-quizz/node_modules/inflight" - ] - ], - "_from": "wrappy@>=1.0.0 <2.0.0", - "_id": "wrappy@1.0.1", - "_inCache": true, - "_installable": true, - "_location": "/wrappy", - "_nodeVersion": "0.10.31", - "_npmUser": { - "email": "i@izs.me", - "name": "isaacs" - }, - "_npmVersion": "2.0.0", - "_phantomChildren": {}, - "_requested": { - "name": "wrappy", - "raw": "wrappy@1", - "rawSpec": "1", - "scope": null, - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/inflight", - "/once" - ], - "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz", - "_shasum": "1e65969965ccbc2db4548c6b84a6f2c5aedd4739", - "_shrinkwrap": null, - "_spec": "wrappy@1", - "_where": "/Users/gautier/git/bitbucket/spaycific-quizz/node_modules/inflight", - "author": { - "email": "i@izs.me", - "name": "Isaac Z. Schlueter", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/npm/wrappy/issues" - }, - "dependencies": {}, - "description": "Callback wrapping utility", - "devDependencies": { - "tap": "^0.4.12" - }, - "directories": { - "test": "test" - }, - "dist": { - "shasum": "1e65969965ccbc2db4548c6b84a6f2c5aedd4739", - "tarball": "http://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz" - }, - "gitHead": "006a8cbac6b99988315834c207896eed71fd069a", - "homepage": "https://github.com/npm/wrappy", - "license": "ISC", - "main": "wrappy.js", - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "name": "wrappy", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/wrappy.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "version": "1.0.1" -} diff --git a/node_modules/wrappy/test/basic.js b/node_modules/wrappy/test/basic.js deleted file mode 100644 index 5ed0fcd..0000000 --- a/node_modules/wrappy/test/basic.js +++ /dev/null @@ -1,51 +0,0 @@ -var test = require('tap').test -var wrappy = require('../wrappy.js') - -test('basic', function (t) { - function onceifier (cb) { - var called = false - return function () { - if (called) return - called = true - return cb.apply(this, arguments) - } - } - onceifier.iAmOnce = {} - var once = wrappy(onceifier) - t.equal(once.iAmOnce, onceifier.iAmOnce) - - var called = 0 - function boo () { - t.equal(called, 0) - called++ - } - // has some rando property - boo.iAmBoo = true - - var onlyPrintOnce = once(boo) - - onlyPrintOnce() // prints 'boo' - onlyPrintOnce() // does nothing - t.equal(called, 1) - - // random property is retained! - t.equal(onlyPrintOnce.iAmBoo, true) - - var logs = [] - var logwrap = wrappy(function (msg, cb) { - logs.push(msg + ' wrapping cb') - return function () { - logs.push(msg + ' before cb') - var ret = cb.apply(this, arguments) - logs.push(msg + ' after cb') - } - }) - - var c = logwrap('foo', function () { - t.same(logs, [ 'foo wrapping cb', 'foo before cb' ]) - }) - c() - t.same(logs, [ 'foo wrapping cb', 'foo before cb', 'foo after cb' ]) - - t.end() -}) diff --git a/node_modules/wrappy/wrappy.js b/node_modules/wrappy/wrappy.js deleted file mode 100644 index bb7e7d6..0000000 --- a/node_modules/wrappy/wrappy.js +++ /dev/null @@ -1,33 +0,0 @@ -// Returns a wrapper function that returns a wrapped callback -// The wrapper function should do some stuff, and return a -// presumably different callback function. -// This makes sure that own properties are retained, so that -// decorations and such are not lost along the way. -module.exports = wrappy -function wrappy (fn, cb) { - if (fn && cb) return wrappy(fn)(cb) - - if (typeof fn !== 'function') - throw new TypeError('need wrapper function') - - Object.keys(fn).forEach(function (k) { - wrapper[k] = fn[k] - }) - - return wrapper - - function wrapper() { - var args = new Array(arguments.length) - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i] - } - var ret = fn.apply(this, args) - var cb = args[args.length-1] - if (typeof ret === 'function' && ret !== cb) { - Object.keys(cb).forEach(function (k) { - ret[k] = cb[k] - }) - } - return ret - } -} diff --git a/node_modules/xtend/.jshintrc b/node_modules/xtend/.jshintrc deleted file mode 100644 index 77887b5..0000000 --- a/node_modules/xtend/.jshintrc +++ /dev/null @@ -1,30 +0,0 @@ -{ - "maxdepth": 4, - "maxstatements": 200, - "maxcomplexity": 12, - "maxlen": 80, - "maxparams": 5, - - "curly": true, - "eqeqeq": true, - "immed": true, - "latedef": false, - "noarg": true, - "noempty": true, - "nonew": true, - "undef": true, - "unused": "vars", - "trailing": true, - - "quotmark": true, - "expr": true, - "asi": true, - - "browser": false, - "esnext": true, - "devel": false, - "node": false, - "nonstandard": false, - - "predef": ["require", "module", "__dirname", "__filename"] -} diff --git a/node_modules/xtend/.npmignore b/node_modules/xtend/.npmignore deleted file mode 100644 index 3c3629e..0000000 --- a/node_modules/xtend/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/xtend/LICENCE b/node_modules/xtend/LICENCE deleted file mode 100644 index 1a14b43..0000000 --- a/node_modules/xtend/LICENCE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012-2014 Raynos. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/xtend/Makefile b/node_modules/xtend/Makefile deleted file mode 100644 index d583fcf..0000000 --- a/node_modules/xtend/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -browser: - node ./support/compile - -.PHONY: browser \ No newline at end of file diff --git a/node_modules/xtend/README.md b/node_modules/xtend/README.md deleted file mode 100644 index 093cb29..0000000 --- a/node_modules/xtend/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# xtend - -[![browser support][3]][4] - -[![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges) - -Extend like a boss - -xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes precedence. - -## Examples - -```js -var extend = require("xtend") - -// extend returns a new object. Does not mutate arguments -var combination = extend({ - a: "a", - b: 'c' -}, { - b: "b" -}) -// { a: "a", b: "b" } -``` - -## Stability status: Locked - -## MIT Licenced - - - [3]: http://ci.testling.com/Raynos/xtend.png - [4]: http://ci.testling.com/Raynos/xtend diff --git a/node_modules/xtend/immutable.js b/node_modules/xtend/immutable.js deleted file mode 100644 index 94889c9..0000000 --- a/node_modules/xtend/immutable.js +++ /dev/null @@ -1,19 +0,0 @@ -module.exports = extend - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -function extend() { - var target = {} - - for (var i = 0; i < arguments.length; i++) { - var source = arguments[i] - - for (var key in source) { - if (hasOwnProperty.call(source, key)) { - target[key] = source[key] - } - } - } - - return target -} diff --git a/node_modules/xtend/mutable.js b/node_modules/xtend/mutable.js deleted file mode 100644 index 72debed..0000000 --- a/node_modules/xtend/mutable.js +++ /dev/null @@ -1,17 +0,0 @@ -module.exports = extend - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -function extend(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] - - for (var key in source) { - if (hasOwnProperty.call(source, key)) { - target[key] = source[key] - } - } - } - - return target -} diff --git a/node_modules/xtend/package.json b/node_modules/xtend/package.json deleted file mode 100644 index 5ec8b8c..0000000 --- a/node_modules/xtend/package.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "_args": [ - [ - "xtend@~4.0.0", - "/Users/gautier/git/bitbucket/spaycific-quizz/node_modules/through2" - ] - ], - "_from": "xtend@>=4.0.0 <4.1.0", - "_id": "xtend@4.0.1", - "_inCache": true, - "_installable": true, - "_location": "/xtend", - "_nodeVersion": "0.10.32", - "_npmUser": { - "email": "raynos2@gmail.com", - "name": "raynos" - }, - "_npmVersion": "2.14.1", - "_phantomChildren": {}, - "_requested": { - "name": "xtend", - "raw": "xtend@~4.0.0", - "rawSpec": "~4.0.0", - "scope": null, - "spec": ">=4.0.0 <4.1.0", - "type": "range" - }, - "_requiredBy": [ - "/glob-stream/through2", - "/through2", - "/vinyl-fs/through2" - ], - "_resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "_shasum": "a5c6d532be656e23db820efb943a1f04998d63af", - "_shrinkwrap": null, - "_spec": "xtend@~4.0.0", - "_where": "/Users/gautier/git/bitbucket/spaycific-quizz/node_modules/through2", - "author": { - "email": "raynos2@gmail.com", - "name": "Raynos" - }, - "bugs": { - "email": "raynos2@gmail.com", - "url": "https://github.com/Raynos/xtend/issues" - }, - "contributors": [ - { - "name": "Jake Verbaten" - }, - { - "name": "Matt Esch" - } - ], - "dependencies": {}, - "description": "extend like a boss", - "devDependencies": { - "tape": "~1.1.0" - }, - "directories": {}, - "dist": { - "shasum": "a5c6d532be656e23db820efb943a1f04998d63af", - "tarball": "http://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" - }, - "engines": { - "node": ">=0.4" - }, - "gitHead": "23dc302a89756da89c1897bc732a752317e35390", - "homepage": "https://github.com/Raynos/xtend", - "keywords": [ - "array", - "extend", - "merge", - "object", - "options", - "opts" - ], - "license": "MIT", - "main": "immutable", - "maintainers": [ - { - "name": "raynos", - "email": "raynos2@gmail.com" - } - ], - "name": "xtend", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/Raynos/xtend.git" - }, - "scripts": { - "test": "node test" - }, - "testling": { - "browsers": [ - "chrome/22..latest", - "chrome/canary", - "firefox/16..latest", - "firefox/nightly", - "ie/7..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "opera/12..latest", - "opera/next", - "safari/5.1..latest" - ], - "files": "test.js" - }, - "version": "4.0.1" -} diff --git a/node_modules/xtend/test.js b/node_modules/xtend/test.js deleted file mode 100644 index 093a2b0..0000000 --- a/node_modules/xtend/test.js +++ /dev/null @@ -1,83 +0,0 @@ -var test = require("tape") -var extend = require("./") -var mutableExtend = require("./mutable") - -test("merge", function(assert) { - var a = { a: "foo" } - var b = { b: "bar" } - - assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) - assert.end() -}) - -test("replace", function(assert) { - var a = { a: "foo" } - var b = { a: "bar" } - - assert.deepEqual(extend(a, b), { a: "bar" }) - assert.end() -}) - -test("undefined", function(assert) { - var a = { a: undefined } - var b = { b: "foo" } - - assert.deepEqual(extend(a, b), { a: undefined, b: "foo" }) - assert.deepEqual(extend(b, a), { a: undefined, b: "foo" }) - assert.end() -}) - -test("handle 0", function(assert) { - var a = { a: "default" } - var b = { a: 0 } - - assert.deepEqual(extend(a, b), { a: 0 }) - assert.deepEqual(extend(b, a), { a: "default" }) - assert.end() -}) - -test("is immutable", function (assert) { - var record = {} - - extend(record, { foo: "bar" }) - assert.equal(record.foo, undefined) - assert.end() -}) - -test("null as argument", function (assert) { - var a = { foo: "bar" } - var b = null - var c = void 0 - - assert.deepEqual(extend(b, a, c), { foo: "bar" }) - assert.end() -}) - -test("mutable", function (assert) { - var a = { foo: "bar" } - - mutableExtend(a, { bar: "baz" }) - - assert.equal(a.bar, "baz") - assert.end() -}) - -test("null prototype", function(assert) { - var a = { a: "foo" } - var b = Object.create(null) - b.b = "bar"; - - assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) - assert.end() -}) - -test("null prototype mutable", function (assert) { - var a = { foo: "bar" } - var b = Object.create(null) - b.bar = "baz"; - - mutableExtend(a, b) - - assert.equal(a.bar, "baz") - assert.end() -}) diff --git a/node_modules/y18n/.npmignore b/node_modules/y18n/.npmignore deleted file mode 100644 index 62adae5..0000000 --- a/node_modules/y18n/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -.DS_Store -node_modules -.nyc_output diff --git a/node_modules/y18n/.travis.yml b/node_modules/y18n/.travis.yml deleted file mode 100644 index d442370..0000000 --- a/node_modules/y18n/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -sudo: false -node_js: - - "0.10" - - "0.12" - - "iojs" - - "4" -after_success: npm run coverage diff --git a/node_modules/y18n/README.md b/node_modules/y18n/README.md deleted file mode 100644 index 5776ee0..0000000 --- a/node_modules/y18n/README.md +++ /dev/null @@ -1,91 +0,0 @@ -# y18n - -[![Build Status][travis-image]][travis-url] -[![Coverage Status][coveralls-image]][coveralls-url] -[![NPM version][npm-image]][npm-url] -[![js-standard-style][standard-image]][standard-url] - -The bare-bones internationalization library used by yargs. - -Inspired by [i18n](https://www.npmjs.com/package/i18n). - -## Examples - -_simple string translation:_ - -```js -var __ = require('y18n').__ - -console.log(__('my awesome string %s', 'foo')) -``` - -output: - -`my awesome string foo` - -_pluralization support:_ - -```js -var __n = require('y18n').__n - -console.log(__n('one fish %s', '%d fishes %s', 2, 'foo')) -``` - -output: - -`2 fishes foo` - -## JSON Language Files - -The JSON language files should be stored in a `./locales` folder. -File names correspond to locales, e.g., `en.json`, `pirate.json`. - -When strings are observed for the first time they will be -added to the JSON file corresponding to the current locale. - -## Methods - -### require('y18n')(config) - -Create an instance of y18n with the config provided, options include: - -* `directory`: the locale directory, default `./locales`. -* `updateFiles`: should newly observed strings be updated in file, default `true`. -* `locale`: what locale should be used. -* `fallbackToLanguage`: should fallback to a language-only file (e.g. `en.json`) - be allowed if a file matching the locale does not exist (e.g. `en_US.json`), - default `true`. - -### y18n.\_\_(str, arg, arg, arg) - -Print a localized string, `%s` will be replaced with `arg`s. - -### y18n.\_\_n(singularString, pluralString, count, arg, arg, arg) - -Print a localized string with appropriate pluralization. If `%d` is provided -in the string, the `count` will replace this placeholder. - -### y18n.setLocale(str) - -Set the current locale being used. - -### y18n.getLocale() - -What locale is currently being used? - -### y18n.updateLocale(obj) - -Update the current locale with the key value pairs in `obj`. - -## License - -ISC - -[travis-url]: https://travis-ci.org/bcoe/y18n -[travis-image]: https://img.shields.io/travis/bcoe/y18n.svg -[coveralls-url]: https://coveralls.io/github/bcoe/y18n -[coveralls-image]: https://img.shields.io/coveralls/bcoe/y18n.svg -[npm-url]: https://npmjs.org/package/y18n -[npm-image]: https://img.shields.io/npm/v/y18n.svg -[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg -[standard-url]: https://github.com/feross/standard diff --git a/node_modules/y18n/index.js b/node_modules/y18n/index.js deleted file mode 100644 index 91b159e..0000000 --- a/node_modules/y18n/index.js +++ /dev/null @@ -1,172 +0,0 @@ -var fs = require('fs') -var path = require('path') -var util = require('util') - -function Y18N (opts) { - // configurable options. - opts = opts || {} - this.directory = opts.directory || './locales' - this.updateFiles = typeof opts.updateFiles === 'boolean' ? opts.updateFiles : true - this.locale = opts.locale || 'en' - this.fallbackToLanguage = typeof opts.fallbackToLanguage === 'boolean' ? opts.fallbackToLanguage : true - - // internal stuff. - this.cache = {} - this.writeQueue = [] -} - -Y18N.prototype.__ = function () { - var args = Array.prototype.slice.call(arguments) - var str = args.shift() - var cb = function () {} // start with noop. - - if (typeof args[args.length - 1] === 'function') cb = args.pop() - cb = cb || function () {} // noop. - - if (!this.cache[this.locale]) this._readLocaleFile() - - // we've observed a new string, update the language file. - if (!this.cache[this.locale][str] && this.updateFiles) { - this.cache[this.locale][str] = str - - // include the current directory and locale, - // since these values could change before the - // write is performed. - this._enqueueWrite([this.directory, this.locale, cb]) - } else { - cb() - } - - return util.format.apply(util, [this.cache[this.locale][str] || str].concat(args)) -} - -Y18N.prototype._enqueueWrite = function (work) { - this.writeQueue.push(work) - if (this.writeQueue.length === 1) this._processWriteQueue() -} - -Y18N.prototype._processWriteQueue = function () { - var _this = this - var work = this.writeQueue[0] - - // destructure the enqueued work. - var directory = work[0] - var locale = work[1] - var cb = work[2] - - var languageFile = this._resolveLocaleFile(directory, locale) - var serializedLocale = JSON.stringify(this.cache[locale], null, 2) - - fs.writeFile(languageFile, serializedLocale, 'utf-8', function (err) { - _this.writeQueue.shift() - if (_this.writeQueue.length > 0) _this._processWriteQueue() - cb(err) - }) -} - -Y18N.prototype._readLocaleFile = function () { - var localeLookup = {} - var languageFile = this._resolveLocaleFile(this.directory, this.locale) - - try { - localeLookup = JSON.parse(fs.readFileSync(languageFile, 'utf-8')) - } catch (err) { - if (err instanceof SyntaxError) { - err.message = 'syntax error in ' + languageFile - } - - if (err.code === 'ENOENT') localeLookup = {} - else throw err - } - - this.cache[this.locale] = localeLookup -} - -Y18N.prototype._resolveLocaleFile = function (directory, locale) { - var file = path.resolve(directory, './', locale + '.json') - if (this.fallbackToLanguage && !this._fileExistsSync(file) && ~locale.lastIndexOf('_')) { - // attempt fallback to language only - var languageFile = path.resolve(directory, './', locale.split('_')[0] + '.json') - if (this._fileExistsSync(languageFile)) file = languageFile - } - return file -} - -// this only exists because fs.existsSync() "will be deprecated" -// see https://nodejs.org/api/fs.html#fs_fs_existssync_path -Y18N.prototype._fileExistsSync = function (file) { - try { - return fs.statSync(file).isFile() - } catch (err) { - return false - } -} - -Y18N.prototype.__n = function () { - var args = Array.prototype.slice.call(arguments) - var singular = args.shift() - var plural = args.shift() - var quantity = args.shift() - - var cb = function () {} // start with noop. - if (typeof args[args.length - 1] === 'function') cb = args.pop() - - if (!this.cache[this.locale]) this._readLocaleFile() - - var str = quantity === 1 ? singular : plural - if (this.cache[this.locale][singular]) { - str = this.cache[this.locale][singular][quantity === 1 ? 'one' : 'other'] - } - - // we've observed a new string, update the language file. - if (!this.cache[this.locale][singular] && this.updateFiles) { - this.cache[this.locale][singular] = { - one: singular, - other: plural - } - - // include the current directory and locale, - // since these values could change before the - // write is performed. - this._enqueueWrite([this.directory, this.locale, cb]) - } else { - cb() - } - - // if a %d placeholder is provided, add quantity - // to the arguments expanded by util.format. - var values = [str] - if (~str.indexOf('%d')) values.push(quantity) - - return util.format.apply(util, values.concat(args)) -} - -Y18N.prototype.setLocale = function (locale) { - this.locale = locale -} - -Y18N.prototype.getLocale = function () { - return this.locale -} - -Y18N.prototype.updateLocale = function (obj) { - if (!this.cache[this.locale]) this._readLocaleFile() - - for (var key in obj) { - this.cache[this.locale][key] = obj[key] - } -} - -module.exports = function (opts) { - var y18n = new Y18N(opts) - - // bind all functions to y18n, so that - // they can be used in isolation. - for (var key in y18n) { - if (typeof y18n[key] === 'function') { - y18n[key] = y18n[key].bind(y18n) - } - } - - return y18n -} diff --git a/node_modules/y18n/package.json b/node_modules/y18n/package.json deleted file mode 100644 index 95e6a7b..0000000 --- a/node_modules/y18n/package.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "_args": [ - [ - "y18n@^3.2.0", - "/Users/gautier/git/bitbucket/spaycific-quizz/node_modules/yargs" - ] - ], - "_from": "y18n@>=3.2.0 <4.0.0", - "_id": "y18n@3.2.0", - "_inCache": true, - "_installable": true, - "_location": "/y18n", - "_nodeVersion": "0.12.7", - "_npmUser": { - "email": "andrewbgoode@gmail.com", - "name": "abg" - }, - "_npmVersion": "2.14.2", - "_phantomChildren": {}, - "_requested": { - "name": "y18n", - "raw": "y18n@^3.2.0", - "rawSpec": "^3.2.0", - "scope": null, - "spec": ">=3.2.0 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/yargs" - ], - "_resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.0.tgz", - "_shasum": "3bec64c93b730d924a6148c765757932433e34c8", - "_shrinkwrap": null, - "_spec": "y18n@^3.2.0", - "_where": "/Users/gautier/git/bitbucket/spaycific-quizz/node_modules/yargs", - "author": { - "email": "ben@npmjs.com", - "name": "Ben Coe" - }, - "bugs": { - "url": "https://github.com/bcoe/y18n/issues" - }, - "dependencies": {}, - "description": "the bare-bones internationalization library used by yargs", - "devDependencies": { - "chai": "^3.3.0", - "coveralls": "^2.11.4", - "mocha": "^2.3.3", - "nyc": "^3.2.2", - "rimraf": "^2.4.3", - "standard": "^5.3.1" - }, - "directories": {}, - "dist": { - "shasum": "3bec64c93b730d924a6148c765757932433e34c8", - "tarball": "http://registry.npmjs.org/y18n/-/y18n-3.2.0.tgz" - }, - "gitHead": "a92184823afa8cccef4c8100a0b79338f85ab089", - "homepage": "https://github.com/bcoe/y18n", - "keywords": [ - "i18n", - "internationalization", - "yargs" - ], - "license": "ISC", - "main": "index.js", - "maintainers": [ - { - "name": "bcoe", - "email": "ben@npmjs.com" - }, - { - "name": "abg", - "email": "andrewbgoode@gmail.com" - } - ], - "name": "y18n", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/bcoe/y18n.git" - }, - "scripts": { - "coverage": "nyc report --reporter=text-lcov | coveralls", - "pretest": "standard", - "test": "nyc mocha" - }, - "version": "3.2.0" -} diff --git a/node_modules/y18n/test/locales/bad-locale.json b/node_modules/y18n/test/locales/bad-locale.json deleted file mode 100644 index d7642f8..0000000 --- a/node_modules/y18n/test/locales/bad-locale.json +++ /dev/null @@ -1 +0,0 @@ -{"hello": "worl} diff --git a/node_modules/y18n/test/locales/en.json b/node_modules/y18n/test/locales/en.json deleted file mode 100644 index 05b0e54..0000000 --- a/node_modules/y18n/test/locales/en.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "Hello": "Hello!", - "Hello %s %s": "Hello %s %s", - "%d cat": { - "one": "%d cat", - "other": "%d cats" - }, - "%d %s cat": { - "one": "%d %s cat", - "other": "%d %s cats" - }, - "There is one monkey in the %s": { - "one": "There is one monkey in the %s", - "other": "There are %d monkeys in the %s" - } -} diff --git a/node_modules/y18n/test/locales/pirate.json b/node_modules/y18n/test/locales/pirate.json deleted file mode 100644 index 9683dd2..0000000 --- a/node_modules/y18n/test/locales/pirate.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "Hello": "Avast ye mateys!", - "%d cat": { - "one": "%d land catfish", - "other": "%d land catfishes" - } -} diff --git a/node_modules/y18n/test/y18n-test.js b/node_modules/y18n/test/y18n-test.js deleted file mode 100644 index 0c7314e..0000000 --- a/node_modules/y18n/test/y18n-test.js +++ /dev/null @@ -1,341 +0,0 @@ -/* global describe, it, after, beforeEach */ - -var expect = require('chai').expect -var fs = require('fs') -var rimraf = require('rimraf') -var y18n = require('../') - -require('chai').should() - -describe('y18n', function () { - describe('configure', function () { - it('allows you to override the default y18n configuration', function () { - var y = y18n({locale: 'fr'}) - y.locale.should.equal('fr') - }) - }) - - describe('_readLocaleFile', function () { - it('throws a helpful error if language file has invalid syntax', function () { - expect(function () { - var __ = y18n({ - locale: 'bad-locale', - directory: __dirname + '/locales' - }).__ - - __('Hello') - }).to.throw(/syntax error/) - }) - }) - - describe('__', function () { - it('uses replacements from the default locale if none is configured', function () { - var __ = y18n({ - directory: __dirname + '/locales' - }).__ - - __('Hello').should.equal('Hello!') - }) - - it('uses replacements from the configured locale', function () { - var __ = y18n({ - locale: 'pirate', - directory: __dirname + '/locales' - }).__ - - __('Hello').should.equal('Avast ye mateys!') - }) - - it('uses language file if language_territory file does not exist', function () { - var __ = y18n({ - locale: 'pirate_JM', - directory: __dirname + '/locales' - }).__ - - __('Hello').should.equal('Avast ye mateys!') - }) - - it('does not fallback to language file if fallbackToLanguage is false', function () { - var __ = y18n({ - locale: 'pirate_JM', - fallbackToLanguage: false, - updateFiles: false, - directory: __dirname + '/locales' - }).__ - - __('Hello').should.equal('Hello') - }) - - it('uses strings as given if no matching locale files found', function () { - var __ = y18n({ - locale: 'zz_ZZ', - updateFiles: false, - directory: __dirname + '/locales' - }).__ - - __('Hello').should.equal('Hello') - }) - - it('expands arguments into %s placeholders', function () { - var __ = y18n({ - directory: __dirname + '/locales' - }).__ - - __('Hello %s %s', 'Ben', 'Coe').should.equal('Hello Ben Coe') - }) - - describe('the first time observing a word', function () { - beforeEach(function (done) { - rimraf('./test/locales/fr*.json', function () { - return done() - }) - }) - - it('returns the word immediately', function () { - var __ = y18n({ - locale: 'fr', - directory: __dirname + '/locales' - }).__ - - __('banana').should.equal('banana') - }) - - it('writes new word to locale file if updateFiles is true', function (done) { - var __ = y18n({ - locale: 'fr_FR', - directory: __dirname + '/locales' - }).__ - - __('banana', function (err) { - var locale = JSON.parse(fs.readFileSync('./test/locales/fr_FR.json', 'utf-8')) - locale.banana.should.equal('banana') - return done(err) - }) - }) - - it('writes new word to language file if language_territory file does not exist', function (done) { - fs.writeFileSync('./test/locales/fr.json', '{"meow": "le meow"}', 'utf-8') - - var __ = y18n({ - locale: 'fr_FR', - directory: __dirname + '/locales' - }).__ - - __('meow').should.equal('le meow') - __('banana', function (err) { - var locale = JSON.parse(fs.readFileSync('./test/locales/fr.json', 'utf-8')) - locale.banana.should.equal('banana') - return done(err) - }) - }) - - it('writes word to missing locale file, if no fallback takes place', function (done) { - fs.writeFileSync('./test/locales/fr.json', '{"meow": "le meow"}', 'utf-8') - - var __ = y18n({ - locale: 'fr_FR', - fallbackToLanguage: false, - directory: __dirname + '/locales' - }).__ - - __('banana', function (err) { - // 'banana' should be written to fr_FR.json - var locale = JSON.parse(fs.readFileSync('./test/locales/fr_FR.json', 'utf-8')) - locale.should.deep.equal({ - banana: 'banana' - }) - // fr.json should remain untouched - var frJson = JSON.parse(fs.readFileSync('./test/locales/fr.json', 'utf-8')) - frJson.should.deep.equal({ - meow: 'le meow' - }) - return done(err) - }) - }) - - it('handles enqueuing multiple writes at the same time', function (done) { - var __ = y18n({ - locale: 'fr', - directory: __dirname + '/locales' - }).__ - - __('apple') - __('banana', function () { - __('foo') - __('bar', function (err) { - var locale = JSON.parse(fs.readFileSync('./test/locales/fr.json', 'utf-8')) - locale.apple.should.equal('apple') - locale.banana.should.equal('banana') - locale.foo.should.equal('foo') - locale.bar.should.equal('bar') - return done(err) - }) - }) - }) - - it('does not write the locale file if updateFiles is false', function (done) { - var __ = y18n({ - locale: 'fr', - updateFiles: false, - directory: __dirname + '/locales' - }).__ - - __('banana', function (err) { - fs.existsSync('./test/locales/fr.json').should.equal(false) - return done(err) - }) - }) - }) - }) - - describe('__n', function () { - it('uses the singular form if quantity is 1', function () { - var __n = y18n({ - directory: __dirname + '/locales' - }).__n - - __n('%d cat', '%d cats', 1).should.equal('1 cat') - }) - - it('uses the plural form if quantity is greater than 1', function () { - var __n = y18n({ - directory: __dirname + '/locales' - }).__n - - __n('%d cat', '%d cats', 2).should.equal('2 cats') - }) - - it('allows additional arguments to be printed', function () { - var __n = y18n({ - directory: __dirname + '/locales' - }).__n - - __n('%d %s cat', '%d %s cats', 2, 'black').should.equal('2 black cats') - }) - - it('allows an alternative locale to be set', function () { - var __n = y18n({ - locale: 'pirate', - directory: __dirname + '/locales' - }).__n - - __n('%d cat', '%d cats', 1).should.equal('1 land catfish') - __n('%d cat', '%d cats', 3).should.equal('3 land catfishes') - }) - - // See: https://github.com/bcoe/yargs/pull/210 - it('allows a quantity placeholder to be provided in the plural but not singular form', function () { - var __n = y18n({ - directory: __dirname + '/locales' - }).__n - - var singular = __n('There is one monkey in the %s', 'There are %d monkeys in the %s', 1, 'tree') - var plural = __n('There is one monkey in the %s', 'There are %d monkeys in the %s', 3, 'tree') - - singular.should.equal('There is one monkey in the tree') - plural.should.equal('There are 3 monkeys in the tree') - }) - - describe('the first time observing a pluralization', function () { - beforeEach(function (done) { - rimraf('./test/locales/fr.json', function () { - return done() - }) - }) - - it('returns the pluralization immediately', function () { - var __n = y18n({ - locale: 'fr', - directory: __dirname + '/locales' - }).__n - - __n('%d le cat', '%d le cats', 1).should.equal('1 le cat') - }) - - it('writes to the locale file if updateFiles is true', function (done) { - var __n = y18n({ - locale: 'fr', - directory: __dirname + '/locales' - }).__n - - __n('%d apple %s', '%d apples %s', 2, 'dude', function (err) { - var locale = JSON.parse(fs.readFileSync('./test/locales/fr.json', 'utf-8')) - locale['%d apple %s'].one.should.equal('%d apple %s') - locale['%d apple %s'].other.should.equal('%d apples %s') - return done(err) - }) - }) - - it('does not write the locale file if updateFiles is false', function (done) { - var __n = y18n({ - locale: 'fr', - updateFiles: false, - directory: __dirname + '/locales' - }).__n - - __n('%d apple %s', '%d apples %s', 2, 'dude', function (err) { - fs.existsSync('./test/locales/fr.json').should.equal(false) - return done(err) - }) - }) - }) - }) - - describe('setLocale', function () { - it('switches the locale', function () { - var i18n = y18n({ - directory: __dirname + '/locales' - }) - - i18n.__('Hello').should.equal('Hello!') - i18n.setLocale('pirate') - i18n.__('Hello').should.equal('Avast ye mateys!') - }) - }) - - describe('updateLocale', function () { - beforeEach(function (done) { - rimraf('./test/locales/fr.json', function () { - return done() - }) - }) - - it('updates the locale with the new lookups provided', function () { - var i18n = y18n({ - locale: 'fr', - directory: __dirname + '/locales' - }) - - i18n.updateLocale({ - foo: 'le bar' - }) - - i18n.__('foo').should.equal('le bar') - }) - - it('loads the locale from disk prior to updating the map', function () { - fs.writeFileSync('./test/locales/fr.json', '{"meow": "le meow"}', 'utf-8') - - var i18n = y18n({ - locale: 'fr', - directory: __dirname + '/locales' - }) - - i18n.updateLocale({ - foo: 'le bar' - }) - - i18n.__('meow').should.equal('le meow') - }) - }) - - describe('getLocale', function () { - it('returns the configured locale', function () { - y18n().getLocale().should.equal('en') - }) - }) - - after(function () { - rimraf.sync('./test/locales/fr.json') - }) -}) diff --git a/node_modules/yargs/CHANGELOG.md b/node_modules/yargs/CHANGELOG.md deleted file mode 100644 index a144d59..0000000 --- a/node_modules/yargs/CHANGELOG.md +++ /dev/null @@ -1,500 +0,0 @@ -## Change Log - -### v3.31.0 (2015/12/03 10:15 +07:00) - -- [#239](https://github.com/bcoe/yargs/pull/239) Pass argv to commands (@bcoe) -- [#308](https://github.com/bcoe/yargs/pull/308) Yargs now handles environment variables (@nexdrew) -- [#302](https://github.com/bcoe/yargs/pull/302) Add Indonesian translation (@rilut) -- [#300](https://github.com/bcoe/yargs/pull/300) Add Turkish translation (@feyzo) -- [#298](https://github.com/bcoe/yargs/pull/298) Add Norwegian Bokmål translation (@sindresorhus) -- [#297](https://github.com/bcoe/yargs/pull/297) Fix for layout of cjk characters (@disjukr) -- [#296](https://github.com/bcoe/yargs/pull/296) Add Korean translation (@disjukr) - -### v3.30.0 (2015/11/13 16:29 +07:00) - -- [#293](https://github.com/bcoe/yargs/pull/293) Polish language support (@kamilogorek) -- [#291](https://github.com/bcoe/yargs/pull/291) fix edge-cases with `.alias()` (@bcoe) -- [#289](https://github.com/bcoe/yargs/pull/289) group options in custom groups (@bcoe) - -### v3.29.0 (2015/10/16 21:51 +07:00) - -- [#282](https://github.com/bcoe/yargs/pull/282) completions now accept promises (@LinusU) -- [#281](https://github.com/bcoe/yargs/pull/281) fix parsing issues with dot notation (@bcoe) - -### v3.28.0 (2015/10/16 1:55 +07:00) - -- [#277](https://github.com/bcoe/yargs/pull/277) adds support for ansi escape codes (@bcoe) - -### v3.27.0 (2015/10/08 1:55 +00:00) - -- [#271](https://github.com/bcoe/yargs/pull/273) skips validation for help or version flags with exitProcess(false) (@tepez) -- [#273](https://github.com/bcoe/yargs/pull/273) implements single output for errors with exitProcess(false) (@nexdrew) -- [#269](https://github.com/bcoe/yargs/pull/269) verifies single output for errors with exitProcess(false) (@tepez) -- [#268](https://github.com/bcoe/yargs/pull/268) adds Chinese translation (@qiu8310) -- [#266](https://github.com/bcoe/yargs/pull/266) adds case for -- after -- in parser test (@geophree) - -### v3.26.0 (2015/09/25 2:14 +00:00) - -- [#263](https://github.com/bcoe/yargs/pull/263) document count() and option() object keys (@nexdrew) -- [#259](https://github.com/bcoe/yargs/pull/259) remove util in readme (@38elements) -- [#258](https://github.com/bcoe/yargs/pull/258) node v4 builds, update deps (@nexdrew) -- [#257](https://github.com/bcoe/yargs/pull/257) fix spelling errors (@dkoleary88) - -### v3.25.0 (2015/09/13 7:38 -07:00) - -- [#254](https://github.com/bcoe/yargs/pull/254) adds Japanese translation (@oti) -- [#253](https://github.com/bcoe/yargs/pull/253) fixes for tests on Windows (@bcoe) - -### v3.24.0 (2015/09/04 12:02 +00:00) - -- [#248](https://github.com/bcoe/yargs/pull/248) reinstate os-locale, no spawning (@nexdrew) -- [#249](https://github.com/bcoe/yargs/pull/249) use travis container-based infrastructure (@nexdrew) -- [#247](https://github.com/bcoe/yargs/pull/247) upgrade standard (@nexdrew) - -### v3.23.0 (2015/08/30 23:00 +00:00) - -- [#246](https://github.com/bcoe/yargs/pull/246) detect locale based only on environment variables (@bcoe) -- [#244](https://github.com/bcoe/yargs/pull/244) adds Windows CI testing (@bcoe) -- [#245](https://github.com/bcoe/yargs/pull/245) adds OSX CI testing (@bcoe, @nexdrew) - -### v3.22.0 (2015/08/28 22:26 +00:00) -- [#242](https://github.com/bcoe/yargs/pull/242) adds detectLocale config option (@bcoe) - -### v3.21.1 (2015/08/28 20:58 +00:00) -- [#240](https://github.com/bcoe/yargs/pull/240) hot-fix for Atom on Windows (@bcoe) - -### v3.21.0 (2015/08/21 21:20 +00:00) -- [#238](https://github.com/bcoe/yargs/pull/238) upgrade camelcase, window-size, chai, mocha (@nexdrew) -- [#237](https://github.com/bcoe/yargs/pull/237) adds defaultDescription to option() (@nexdrew) - -### v3.20.0 (2015/08/20 01:29 +00:00) -- [#231](https://github.com/bcoe/yargs/pull/231) Merge pull request #231 from bcoe/detect-locale (@sindresorhus) -- [#235](https://github.com/bcoe/yargs/pull/235) adds german translation to yargs (@maxrimue) - -### v3.19.0 (2015/08/14 05:12 +00:00) -- [#224](https://github.com/bcoe/yargs/pull/224) added Portuguese translation (@codemonkey3045) - -### v3.18.1 (2015/08/12 05:53 +00:00) - -- [#228](https://github.com/bcoe/yargs/pull/228) notes about embedding yargs in Electron (@etiktin) -- [#223](https://github.com/bcoe/yargs/pull/223) make booleans work in config files (@sgentle) - -### v3.18.0 (2015/08/06 20:05 +00:00) -- [#222](https://github.com/bcoe/yargs/pull/222) updates fr locale (@nexdrew) -- [#221](https://github.com/bcoe/yargs/pull/221) adds missing locale strings (@nexdrew) -- [#220](https://github.com/bcoe/yargs/pull/220) adds es locale (@zkat) - -### v3.17.1 (2015/08/02 19:35 +00:00) -- [#218](https://github.com/bcoe/yargs/pull/218) upgrades nyc (@bcoe) - -### v3.17.0 (2015/08/02 18:39 +00:00) -- [#217](https://github.com/bcoe/yargs/pull/217) sort methods in README.md (@nexdrew) -- [#215](https://github.com/bcoe/yargs/pull/215) adds fr locale (@LoicMahieu) - -### v3.16.0 (2015/07/30 04:35 +00:00) -- [#210](https://github.com/bcoe/yargs/pull/210) adds i18n support to yargs (@bcoe) -- [#209](https://github.com/bcoe/yargs/pull/209) adds choices type to yargs (@nexdrew) -- [#207](https://github.com/bcoe/yargs/pull/207) pretty new shields from shields.io (@SimenB) -- [#208](https://github.com/bcoe/yargs/pull/208) improvements to README.md (@nexdrew) -- [#205](https://github.com/bcoe/yargs/pull/205) faster build times on Travis (@ChristianMurphy) - -### v3.15.0 (2015/07/06 06:01 +00:00) -- [#197](https://github.com/bcoe/yargs/pull/197) tweaks to how errors bubble up from parser.js (@bcoe) -- [#193](https://github.com/bcoe/yargs/pull/193) upgraded nyc, reporting now happens by default (@bcoe) - -### v3.14.0 (2015/06/28 02:12 +00:00) - -- [#192](https://github.com/bcoe/yargs/pull/192) standard style nits (@bcoe) -- [#190](https://github.com/bcoe/yargs/pull/190) allow for hidden commands, e.g., - .completion('completion', false) (@tschaub) - -### v3.13.0 (2015/06/24 04:12 +00:00) - -- [#187](https://github.com/bcoe/yargs/pull/187) completion now behaves differently - if it is being run in the context of a command (@tschaub) -- [#186](https://github.com/bcoe/yargs/pull/186) if no matches are found for a completion - default to filename completion (@tschaub) - -### v3.12.0 (2015/06/19 03:23 +00:00) -- [#183](https://github.com/bcoe/yargs/pull/183) don't complete commands if they've already been completed (@tschaub) -- [#181](https://github.com/bcoe/yargs/pull/181) various fixes for completion. (@bcoe, @tschaub) -- [#182](https://github.com/bcoe/yargs/pull/182) you can now set a maximum # of of required arguments (@bcoe) - -### v3.11.0 (2015/06/15 05:15 +00:00) - -- [#173](https://github.com/bcoe/yargs/pull/173) update standard, window-size, chai (@bcoe) -- [#171](https://github.com/bcoe/yargs/pull/171) a description can now be set - when providing a config option. (@5c077yP) - -### v3.10.0 (2015/05/29 04:25 +00:00) - -- [#165](https://github.com/bcoe/yargs/pull/165) expose yargs.terminalWidth() thanks @ensonic (@bcoe) -- [#164](https://github.com/bcoe/yargs/pull/164) better array handling thanks @getify (@bcoe) - -### v3.9.1 (2015/05/20 05:14 +00:00) -- [b6662b6](https://github.com/bcoe/yargs/commit/b6662b6774cfeab4876f41ec5e2f67b7698f4e2f) clarify .config() docs (@linclark) -- [0291360](https://github.com/bcoe/yargs/commit/02913606285ce31ce81d7f12c48d8a3029776ec7) fixed tests, switched to nyc for coverage, fixed security issue, added Lin as collaborator (@bcoe) - -### v3.9.0 (2015/05/10 18:32 +00:00) -- [#157](https://github.com/bcoe/yargs/pull/157) Merge pull request #157 from bcoe/command-yargs. allows handling of command specific arguments. Thanks for the suggestion @ohjames (@bcoe) -- [#158](https://github.com/bcoe/yargs/pull/158) Merge pull request #158 from kemitchell/spdx-license. Update license format (@kemitchell) - -### v3.8.0 (2015/04/24 23:10 +00:00) -- [#154](https://github.com/bcoe/yargs/pull/154) showHelp's method signature was misleading fixes #153 (@bcoe) -- [#151](https://github.com/bcoe/yargs/pull/151) refactor yargs' table layout logic to use new helper library (@bcoe) -- [#150](https://github.com/bcoe/yargs/pull/150) Fix README example in argument requirements (@annonymouse) - -### v3.7.2 (2015/04/13 11:52 -07:00) - -* [679fbbf](https://github.com/bcoe/yargs/commit/679fbbf55904030ccee8a2635e8e5f46551ab2f0) updated yargs to use the [standard](https://github.com/feross/standard) style guide (agokjr) -* [22382ee](https://github.com/bcoe/yargs/commit/22382ee9f5b495bc2586c1758cd1091cec3647f9 various bug fixes for $0 (@nylen) - -### v3.7.1 (2015/04/10 11:06 -07:00) - -* [89e1992](https://github.com/bcoe/yargs/commit/89e1992a004ba73609b5f9ee6890c4060857aba4) detect iojs bin along with node bin. (@bcoe) -* [755509e](https://github.com/bcoe/yargs/commit/755509ea90041e5f7833bba3b8c5deffe56f0aab) improvements to example documentation in README.md (@rstacruz) -* [0d2dfc8](https://github.com/bcoe/yargs/commit/0d2dfc822a43418242908ad97ddd5291a1b35dc6) showHelp() no longer requires that .argv has been called (@bcoe) - -### v3.7.0 (2015/04/04 02:29 -07:00) - -* [56cbe2d](https://github.com/bcoe/yargs/commit/56cbe2ddd33dc176dcbf97ba40559864a9f114e4) make .requiresArg() work with type hints. (@bcoe). -* [2f5d562](https://github.com/bcoe/yargs/commit/2f5d5624f736741deeedf6a664d57bc4d857bdd0) serialize arrays and objects in usage strings. (@bcoe). -* [5126304](https://github.com/bcoe/yargs/commit/5126304dd18351fc28f10530616fdd9361e0af98) be more lenient about alias/primary key ordering in chaining API. (@bcoe) - -### v3.6.0 (2015/03/21 01:00 +00:00) -- [4e24e22](https://github.com/bcoe/yargs/commit/4e24e22e6a195e55ab943ede704a0231ac33b99c) support for .js configuration files. (@pirxpilot) - -### v3.5.4 (2015/03/12 05:56 +00:00) -- [c16cc08](https://github.com/bcoe/yargs/commit/c16cc085501155cf7fd853ccdf8584b05ab92b78) message for non-option arguments is now optional, thanks to (@raine) - -### v3.5.3 (2015/03/09 06:14 +00:00) -- [870b428](https://github.com/bcoe/yargs/commit/870b428cf515d560926ca392555b7ad57dba9e3d) completion script was missing in package.json (@bcoe) - -### v3.5.2 (2015/03/09 06:11 +00:00) -- [58a4b24](https://github.com/bcoe/yargs/commit/58a4b2473ebbb326713d522be53e32d3aabb08d2) parse was being called multiple times, resulting in strange behavior (@bcoe) - -### v3.5.1 (2015/03/09 04:55 +00:00) -- [4e588e0](https://github.com/bcoe/yargs/commit/4e588e055afbeb9336533095f051496e3977f515) accidentally left testing logic in (@bcoe) - -### v3.5.0 (2015/03/09 04:49 +00:00) -- [718bacd](https://github.com/bcoe/yargs/commit/718bacd81b9b44f786af76b2afe491fe06274f19) added support for bash completions see #4 (@bcoe) -- [a192882](https://github.com/bcoe/yargs/commit/a19288270fc431396c42af01125eeb4443664528) downgrade to mocha 2.1.0 until https://github.com/mochajs/mocha/issues/1585 can be sorted out (@bcoe) - -### v3.4.7 (2015/03/09 04:09 +00:00) -- [9845e5c](https://github.com/bcoe/yargs/commit/9845e5c1a9c684ba0be3f0bfb40e7b62ab49d9c8) the Argv singleton was not being updated when manually parsing arguments, fixes #114 (@bcoe) - -### v3.4.6 (2015/03/09 04:01 +00:00) -- [45b4c80](https://github.com/bcoe/yargs/commit/45b4c80b890d02770b0a94f326695a8a566e8fe9) set placeholders for all keys fixes #115 (@bcoe) - -### v3.4.5 (2015/03/01 20:31 +00:00) -- [a758e0b](https://github.com/bcoe/yargs/commit/a758e0b2556184f067cf3d9c4ef886d39817ebd2) fix for count consuming too many arguments (@bcoe) - -### v3.4.4 (2015/02/28 04:52 +00:00) -- [0476af7](https://github.com/bcoe/yargs/commit/0476af757966acf980d998b45108221d4888cfcb) added nargs feature, allowing you to specify the number of arguments after an option (@bcoe) -- [092477d](https://github.com/bcoe/yargs/commit/092477d7ab3efbf0ba11cede57f7d8cfc70b024f) updated README with full example of v3.0 API (@bcoe) - -### v3.3.3 (2015/02/28 04:23 +00:00) -- [0c4b769](https://github.com/bcoe/yargs/commit/0c4b769516cd8d93a7c4e5e675628ae0049aa9a8) remove string dependency, which conflicted with other libraries see #106 (@bcoe) - -### v3.3.2 (2015/02/28 04:11 +00:00) -- [2a98906](https://github.com/bcoe/yargs/commit/2a9890675821c0e7a12f146ce008b0562cb8ec9a) add $0 to epilog (@schnittstabil) - -### v3.3.1 (2015/02/24 03:28 +00:00) -- [ad485ce](https://github.com/bcoe/yargs/commit/ad485ce748ebdfce25b88ef9d6e83d97a2f68987) fix for applying defaults to camel-case args (@bcoe) - -### v3.3.0 (2015/02/24 00:49 +00:00) -- [8bfe36d](https://github.com/bcoe/yargs/commit/8bfe36d7fb0f93a799ea3f4c756a7467c320f8c0) fix and document restart() command, as a tool for building nested CLIs (@bcoe) - -### v3.2.1 (2015/02/22 05:45 +00:00) -- [49a6d18](https://github.com/bcoe/yargs/commit/49a6d1822a4ef9b1ea6f90cc366be60912628885) you can now provide a function that generates a default value (@bcoe) - -### v3.2.0 (2015/02/22 05:24 +00:00) -- [7a55886](https://github.com/bcoe/yargs/commit/7a55886c9343cf71a20744ca5cdd56d2ea7412d5) improvements to yargs two-column text layout (@bcoe) -- [b6ab513](https://github.com/bcoe/yargs/commit/b6ab5136a4c3fa6aa496f6b6360382e403183989) Tweak NPM version badge (@nylen) - -### v3.1.0 (2015/02/19 19:37 +00:00) -- [9bd2379](https://github.com/bcoe/yargs/commit/9bd237921cf1b61fd9f32c0e6d23f572fc225861) version now accepts a function, making it easy to load version #s from a package.json (@bcoe) - -### v3.0.4 (2015/02/14 01:40 +00:00) -- [0b7c19b](https://github.com/bcoe/yargs/commit/0b7c19beaecb747267ca4cc10e5cb2a8550bc4b7) various fixes for dot-notation handling (@bcoe) - -### v3.0.3 (2015/02/14 00:59 +00:00) -- [c3f35e9](https://github.com/bcoe/yargs/commit/c3f35e99bd5a0d278073fcadd95e2d778616cc17) make sure dot-notation is applied to aliases (@bcoe) - -### 3.0.2 (2015/02/13 16:50 +00:00) -- [74c8967](https://github.com/bcoe/yargs/commit/74c8967c340c204a0a7edf8a702b6f46c2705435) document epilog shorthand of epilogue. (@bcoe) -- [670110f](https://github.com/bcoe/yargs/commit/670110fc01bedc4831b6fec6afac54517d5a71bc) any non-truthy value now causes check to fail see #76 (@bcoe) -- [0d8f791](https://github.com/bcoe/yargs/commit/0d8f791a33c11ced4cd431ea8d3d3a337d456b56) finished implementing my wish-list of fetures for yargs 3.0. see #88 (@bcoe) -- [5768447](https://github.com/bcoe/yargs/commit/5768447447c4c8e8304f178846206ce86540f063) fix coverage. (@bcoe) -- [82e793f](https://github.com/bcoe/yargs/commit/82e793f3f61c41259eaacb67f0796aea2cf2aaa0) detect console width and perform word-wrapping. (@bcoe) -- [67476b3](https://github.com/bcoe/yargs/commit/67476b37eea07fee55f23f35b9e0c7d76682b86d) refactor two-column table layout so that we can use it for examples and usage (@bcoe) -- [4724cdf](https://github.com/bcoe/yargs/commit/4724cdfcc8e37ae1ca3dcce9d762f476e9ef4bb4) major refactor of index.js, in prep for 3.x release. (@bcoe) - -### v2.3.0 (2015/02/08 20:41 +00:00) -- [d824620](https://github.com/bcoe/yargs/commit/d824620493df4e63664af1fe320764dd1a9244e6) allow for undefined boolean defaults (@ashi009) - -### v2.2.0 (2015/02/08 20:07 +00:00) -- [d6edd98](https://github.com/bcoe/yargs/commit/d6edd9848826e7389ed1393858c45d03961365fd) in-prep for further refactoring, and a 3.x release I've shuffled some things around and gotten test-coverage to 100%. (@bcoe) - -### v2.1.2 (2015/02/08 06:05 +00:00) -- [d640745](https://github.com/bcoe/yargs/commit/d640745a7b9f8d476e0223879d056d18d9c265c4) switch to path.relative (@bcoe) -- [3bfd41f](https://github.com/bcoe/yargs/commit/3bfd41ff262a041f29d828b88936a79c63cad594) remove mocha.opts. (@bcoe) -- [47a2f35](https://github.com/bcoe/yargs/commit/47a2f357091db70903a402d6765501c1d63f15fe) document using .string('_') for string ids. see #56 (@bcoe) -- [#57](https://github.com/bcoe/yargs/pull/57) Merge pull request #57 from eush77/option-readme (@eush77) - -### v2.1.1 (2015/02/06 08:08 +00:00) -- [01c6c61](https://github.com/bcoe/yargs/commit/01c6c61d67b4ebf88f41f0b32a345ec67f0ac17d) fix for #71, 'newAliases' of undefined (@bcoe) - -### v2.1.0 (2015/02/06 07:59 +00:00) -- [6a1a3fa](https://github.com/bcoe/yargs/commit/6a1a3fa731958e26ccd56885f183dd8985cc828f) try to guess argument types, and apply sensible defaults see #73 (@bcoe) - -### v2.0.1 (2015/02/06 07:54 +00:00) -- [96a06b2](https://github.com/bcoe/yargs/commit/96a06b2650ff1d085a52b7328d8bba614c20cc12) Fix for strange behavior with --sort option, see #51 (@bcoe) - -### v2.0.0 (2015/02/06 07:45 +00:00) -- [0250517](https://github.com/bcoe/yargs/commit/0250517c9643e53f431b824e8ccfa54937414011) - [108fb84](https://github.com/bcoe/yargs/commit/108fb8409a3a63dcaf99d917fe4dfcfaa1de236d) fixed bug with boolean parsing, when bools separated by = see #66 (@bcoe) -- [a465a59](https://github.com/bcoe/yargs/commit/a465a5915f912715738de890982e4f8395958b10) Add `files` field to the package.json (@shinnn) -- [31043de](https://github.com/bcoe/yargs/commit/31043de7a38a17c4c97711f1099f5fb164334db3) fix for yargs.argv having the same keys added multiple times see #63 (@bcoe) -- [2d68c5b](https://github.com/bcoe/yargs/commit/2d68c5b91c976431001c4863ce47c9297850f1ad) Disable process.exit calls using .exitProcess(false) (@cianclarke) -- [45da9ec](https://github.com/bcoe/yargs/commit/45da9ec4c55a7bd394721bc6a1db0dabad7bc52a) Mention .option in README (@eush77) - -### v1.3.2 (2014/10/06 21:56 +00:00) -- [b8d3472](https://github.com/bcoe/yargs/commit/b8d34725482e5821a3cc809c0df71378f282f526) 1.3.2 (@chevex) - -### list (2014/08/30 18:41 +00:00) -- [fbc777f](https://github.com/bcoe/yargs/commit/fbc777f416eeefd37c84e44d27d7dfc7c1925721) Now that yargs is the successor to optimist, I'm changing the README language to be more universal. Pirate speak isn't very accessible to non-native speakers. (@chevex) -- [a54d068](https://github.com/bcoe/yargs/commit/a54d0682ae2efc2394d407ab171cc8a8bbd135ea) version output will not print extra newline (@boneskull) -- [1cef5d6](https://github.com/bcoe/yargs/commit/1cef5d62a9d6d61a3948a49574892e01932cc6ae) Added contributors section to package.json (@chrisn) -- [cc295c0](https://github.com/bcoe/yargs/commit/cc295c0a80a2de267e0155b60d315fc4b6f7c709) Added 'require' and 'required' as synonyms for 'demand' (@chrisn) -- [d0bf951](https://github.com/bcoe/yargs/commit/d0bf951d949066b6280101ed606593d079ee15c8) Updating minimist. (@chevex) -- [c15f8e7](https://github.com/bcoe/yargs/commit/c15f8e7f245b261e542cf205ce4f4313630cbdb4) Fix #31 (bad interaction between camelCase options and strict mode) (@nylen) -- [d991b9b](https://github.com/bcoe/yargs/commit/d991b9be687a68812dee1e3b185ba64b7778b82d) Added .help() and .version() methods (@chrisn) -- [e8c8aa4](https://github.com/bcoe/yargs/commit/e8c8aa46268379357cb11e9fc34b8c403037724b) Added .showHelpOnFail() method (@chrisn) -- [e855af4](https://github.com/bcoe/yargs/commit/e855af4a933ea966b5bbdd3c4c6397a4bac1a053) Allow boolean flag with .demand() (@chrisn) -- [14dbec2](https://github.com/bcoe/yargs/commit/14dbec24fb7380683198e2b20c4deb8423e64bea) Fixes issue #22. Arguments are no longer printed to the console when using .config. (@chevex) -- [bef74fc](https://github.com/bcoe/yargs/commit/bef74fcddc1544598a804f80d0a3728459f196bf) Informing users that Yargs is the official optimist successor. (@chevex) -- [#24](https://github.com/bcoe/yargs/pull/24) Merge pull request #24 from chrisn/strict (@chrisn) -- [889a2b2](https://github.com/bcoe/yargs/commit/889a2b28eb9768801b05163360a470d0fd6c8b79) Added requiresArg option, for options that require values (@chrisn) -- [eb16369](https://github.com/bcoe/yargs/commit/eb163692262be1fe80b992fd8803d5923c5a9b18) Added .strict() method, to report error if unknown arguments are given (@chrisn) -- [0471c3f](https://github.com/bcoe/yargs/commit/0471c3fd999e1ad4e6cded88b8aa02013b66d14f) Changed optimist to yargs in usage-options.js example (@chrisn) -- [5c88f74](https://github.com/bcoe/yargs/commit/5c88f74e3cf031b17c54b4b6606c83e485ff520e) Change optimist to yargs in examples (@chrisn) -- [66f12c8](https://github.com/bcoe/yargs/commit/66f12c82ba3c943e4de8ca862980e835da8ecb3a) Fix a couple of bad interactions between aliases and defaults (@nylen) -- [8fa1d80](https://github.com/bcoe/yargs/commit/8fa1d80f14b03eb1f2898863a61f1d1615bceb50) Document second argument of usage(message, opts) (@Gobie) -- [56e6528](https://github.com/bcoe/yargs/commit/56e6528cf674ff70d63083fb044ff240f608448e) For "--some-option", also set argv.someOption (@nylen) -- [ed5f6d3](https://github.com/bcoe/yargs/commit/ed5f6d33f57ad1086b11c91b51100f7c6c7fa8ee) Finished porting unit tests to Mocha. (@chevex) - -### v1.0.15 (2014/02/05 23:18 +00:00) -- [e2b1fc0](https://github.com/bcoe/yargs/commit/e2b1fc0c4a59cf532ae9b01b275e1ef57eeb64d2) 1.0.15 update to badges (@chevex) - -### v1.0.14 (2014/02/05 23:17 +00:00) -- [f33bbb0](https://github.com/bcoe/yargs/commit/f33bbb0f00fe18960f849cc8e15a7428a4cd59b8) Revert "Fixed issue which caused .demand function not to work correctly." (@chevex) - -### v1.0.13 (2014/02/05 22:13 +00:00) -- [6509e5e](https://github.com/bcoe/yargs/commit/6509e5e7dee6ef1a1f60eea104be0faa1a045075) Fixed issue which caused .demand function not to work correctly. (@chevex) - -### v1.0.12 (2013/12/13 00:09 +00:00) -- [05eb267](https://github.com/bcoe/yargs/commit/05eb26741c9ce446b33ff006e5d33221f53eaceb) 1.0.12 (@chevex) - -### v1.0.11 (2013/12/13 00:07 +00:00) -- [c1bde46](https://github.com/bcoe/yargs/commit/c1bde46e37318a68b87d17a50c130c861d6ce4a9) 1.0.11 (@chevex) - -### v1.0.10 (2013/12/12 23:57 +00:00) -- [dfebf81](https://github.com/bcoe/yargs/commit/dfebf8164c25c650701528ee581ca483a99dc21c) Fixed formatting in README (@chevex) - -### v1.0.9 (2013/12/12 23:47 +00:00) -- [0b4e34a](https://github.com/bcoe/yargs/commit/0b4e34af5e6d84a9dbb3bb6d02cd87588031c182) Update README.md (@chevex) - -### v1.0.8 (2013/12/06 16:36 +00:00) -- [#1](https://github.com/bcoe/yargs/pull/1) fix error caused by check() see #1 (@martinheidegger) - -### v1.0.7 (2013/11/24 18:01 +00:00) -- [a247d88](https://github.com/bcoe/yargs/commit/a247d88d6e46644cbb7303c18b1bb678fc132d72) Modified Pirate Joe image. (@chevex) - -### v1.0.6 (2013/11/23 19:21 +00:00) -- [d7f69e1](https://github.com/bcoe/yargs/commit/d7f69e1d34bc929736a8bdccdc724583e21b7eab) Updated Pirate Joe image. (@chevex) - -### v1.0.5 (2013/11/23 19:09 +00:00) -- [ece809c](https://github.com/bcoe/yargs/commit/ece809cf317cc659175e1d66d87f3ca68c2760be) Updated readme notice again. (@chevex) - -### v1.0.4 (2013/11/23 19:05 +00:00) -- [9e81e81](https://github.com/bcoe/yargs/commit/9e81e81654028f83ba86ffc3ac772a0476084e5e) Updated README with a notice about yargs being a fork of optimist and what that implies. (@chevex) - -### v1.0.3 (2013/11/23 17:43 +00:00) -- [65e7a78](https://github.com/bcoe/yargs/commit/65e7a782c86764944d63d084416aba9ee6019c5f) Changed some small wording in README.md. (@chevex) -- [459e20e](https://github.com/bcoe/yargs/commit/459e20e539b366b85128dd281ccd42221e96c7da) Fix a bug in the options function, when string and boolean options weren't applied to aliases. (@shockone) - -### v1.0.2 (2013/11/23 09:46 +00:00) -- [3d80ebe](https://github.com/bcoe/yargs/commit/3d80ebed866d3799224b6f7d596247186a3898a9) 1.0.2 (@chevex) - -### v1.0.1 (2013/11/23 09:39 +00:00) -- [f80ff36](https://github.com/bcoe/yargs/commit/f80ff3642d580d4b68bf9f5a94277481bd027142) Updated image. (@chevex) - -### v1.0.0 (2013/11/23 09:33 +00:00) -- [54e31d5](https://github.com/bcoe/yargs/commit/54e31d505f820b80af13644e460894b320bf25a3) Rebranded from optimist to yargs in the spirit of the fork :D (@chevex) -- [4ebb6c5](https://github.com/bcoe/yargs/commit/4ebb6c59f44787db7c24c5b8fe2680f01a23f498) Added documentation for demandCount(). (@chevex) -- [4561ce6](https://github.com/bcoe/yargs/commit/4561ce66dcffa95f49e8b4449b25b94cd68acb25) Simplified the error messages returned by .check(). (@chevex) -- [661c678](https://github.com/bcoe/yargs/commit/661c67886f479b16254a830b7e1db3be29e6b7a6) Fixed an issue with demand not accepting a zero value. (@chevex) -- [731dd3c](https://github.com/bcoe/yargs/commit/731dd3c37624790490bd6df4d5f1da8f4348279e) Add .fail(fn) so death isn't the only option. Should fix issue #39. (@chevex) -- [fa15417](https://github.com/bcoe/yargs/commit/fa15417ff9e70dace0d726627a5818654824c1d8) Added a few missing 'return self' (@chevex) -- [e655e4d](https://github.com/bcoe/yargs/commit/e655e4d99d1ae1d3695ef755d51c2de08d669761) Fix showing help in certain JS environments. (@chevex) -- [a746a31](https://github.com/bcoe/yargs/commit/a746a31cd47c87327028e6ea33762d6187ec5c87) Better string representation of default values. (@chevex) -- [6134619](https://github.com/bcoe/yargs/commit/6134619a7e90b911d5443230b644c5d447c1a68c) Implies: conditional demands (@chevex) -- [046b93b](https://github.com/bcoe/yargs/commit/046b93b5d40a27367af4cb29726e4d781d934639) Added support for JSON config files. (@chevex) -- [a677ec0](https://github.com/bcoe/yargs/commit/a677ec0a0ecccd99c75e571d03323f950688da03) Add .example(cmd, desc) feature. (@chevex) -- [1bd4375](https://github.com/bcoe/yargs/commit/1bd4375e11327ba1687d4bb6e5e9f3c30c1be2af) Added 'defaults' as alias to 'default' so as to avoid usage of a reserved keyword. (@chevex) -- [6b753c1](https://github.com/bcoe/yargs/commit/6b753c16ca09e723060e70b773b430323b29c45c) add .normalize(args..) support for normalizing paths (@chevex) -- [33d7d59](https://github.com/bcoe/yargs/commit/33d7d59341d364f03d3a25f0a55cb99004dbbe4b) Customize error messages with demand(key, msg) (@chevex) -- [647d37f](https://github.com/bcoe/yargs/commit/647d37f164c20f4bafbf67dd9db6cd6e2cd3b49f) Merge branch 'rewrite-duplicate-test' of github.com:isbadawi/node-optimist (@chevex) -- [9059d1a](https://github.com/bcoe/yargs/commit/9059d1ad5e8aea686c2a01c89a23efdf929fff2e) Pass aliases object to check functions for greater versatility. (@chevex) -- [623dc26](https://github.com/bcoe/yargs/commit/623dc26c7331abff2465ef8532e3418996d42fe6) Added ability to count boolean options and rolled minimist library back into project. (@chevex) -- [49f0dce](https://github.com/bcoe/yargs/commit/49f0dcef35de4db544c3966350d36eb5838703f6) Fixed small typo. (@chevex) -- [79ec980](https://github.com/bcoe/yargs/commit/79ec9806d9ca6eb0014cfa4b6d1849f4f004baf2) Removed dependency on wordwrap module. (@chevex) -- [ea14630](https://github.com/bcoe/yargs/commit/ea14630feddd69d1de99dd8c0e08948f4c91f00a) Merge branch 'master' of github.com:chbrown/node-optimist (@chevex) -- [2b75da2](https://github.com/bcoe/yargs/commit/2b75da2624061e0f4f3107d20303c06ec9054906) Merge branch 'master' of github.com:seanzhou1023/node-optimist (@chevex) -- [d9bda11](https://github.com/bcoe/yargs/commit/d9bda1116e26f3b40e833ca9ca19263afea53565) Merge branch 'patch-1' of github.com:thefourtheye/node-optimist (@chevex) -- [d6cc606](https://github.com/bcoe/yargs/commit/d6cc6064a4f1bea38a16a4430b8a1334832fbeff) Renamed README. (@chevex) -- [9498d3f](https://github.com/bcoe/yargs/commit/9498d3f59acfb5e102826503e681623c3a64b178) Renamed readme and added .gitignore. (@chevex) -- [bbd1fe3](https://github.com/bcoe/yargs/commit/bbd1fe37fefa366dde0fb3dc44d91fe8b28f57f5) Included examples for ```help``` and ```showHelp``` functions and fixed few formatting issues (@thefourtheye) -- [37fea04](https://github.com/bcoe/yargs/commit/37fea0470a5796a0294c1dcfff68d8041650e622) .alias({}) behaves differently based on mapping direction when generating descriptions (@chbrown) -- [855b20d](https://github.com/bcoe/yargs/commit/855b20d0be567ca121d06b30bea64001b74f3d6d) Documented function signatures are useful for dynamically typed languages. (@chbrown) - -### 0.6.0 (2013/06/25 08:48 +00:00) -- [d37bfe0](https://github.com/bcoe/yargs/commit/d37bfe05ae6d295a0ab481efe4881222412791f4) all tests passing using minimist (@substack) -- [76f1352](https://github.com/bcoe/yargs/commit/76f135270399d01f2bbc621e524a5966e5c422fd) all parse tests now passing (@substack) -- [a7b6754](https://github.com/bcoe/yargs/commit/a7b6754276c38d1565479a5685c3781aeb947816) using minimist, some tests passing (@substack) -- [6655688](https://github.com/bcoe/yargs/commit/66556882aa731cbbbe16cc4d42c85740a2e98099) Give credit where its due (@DeadAlready) -- [602a2a9](https://github.com/bcoe/yargs/commit/602a2a92a459f93704794ad51b115bbb08b535ce) v0.5.3 - Remove wordwrap as dependency (@DeadAlready) - -### 0.5.2 (2013/05/31 03:46 +00:00) -- [4497ca5](https://github.com/bcoe/yargs/commit/4497ca55e332760a37b866ec119ded347ca27a87) fixed the whitespace bug without breaking anything else (@substack) -- [5a3dd1a](https://github.com/bcoe/yargs/commit/5a3dd1a4e0211a38613c6e02f61328e1031953fa) failing test for whitespace arg (@substack) - -### 0.5.1 (2013/05/30 07:17 +00:00) -- [a20228f](https://github.com/bcoe/yargs/commit/a20228f62a454755dd07f628a7c5759113918327) fix parse() to work with functions before it (@substack) -- [b13bd4c](https://github.com/bcoe/yargs/commit/b13bd4cac856a9821d42fa173bdb58f089365a7d) failing test for parse() with modifiers (@substack) - -### 0.5.0 (2013/05/18 21:59 +00:00) -- [c474a64](https://github.com/bcoe/yargs/commit/c474a649231527915c222156e3b40806d365a87c) fixes for dash (@substack) - -### 0.4.0 (2013/04/13 19:03 +00:00) -- [dafe3e1](https://github.com/bcoe/yargs/commit/dafe3e18d7c6e7c2d68e06559df0e5cbea3adb14) failing short test (@substack) - -### 0.3.7 (2013/04/04 04:07 +00:00) -- [6c7a0ec](https://github.com/bcoe/yargs/commit/6c7a0ec94ce4199a505f0518b4d6635d4e47cc81) Fix for windows. On windows there is no _ in environment. (@hdf) - -### 0.3.6 (2013/04/04 04:04 +00:00) -- [e72346a](https://github.com/bcoe/yargs/commit/e72346a727b7267af5aa008b418db89970873f05) Add support for newlines in -a="" arguments (@danielbeardsley) -- [71e1fb5](https://github.com/bcoe/yargs/commit/71e1fb55ea9987110a669ac6ec12338cfff3821c) drop 0.4, add 0.8 to travis (@substack) - -### 0.3.5 (2012/10/10 11:09 +00:00) -- [ee692b3](https://github.com/bcoe/yargs/commit/ee692b37554c70a0bb16389a50a26b66745cbbea) Fix parsing booleans (@vojtajina) -- [5045122](https://github.com/bcoe/yargs/commit/5045122664c3f5b4805addf1be2148d5856f7ce8) set $0 properly in the tests (@substack) - -### 0.3.4 (2012/04/30 06:54 +00:00) -- [f28c0e6](https://github.com/bcoe/yargs/commit/f28c0e62ca94f6e0bb2e6d82fc3d91a55e69b903) bump for string "true" params (@substack) -- [8f44aeb](https://github.com/bcoe/yargs/commit/8f44aeb74121ddd689580e2bf74ef86a605e9bf2) Fix failing test for aliased booleans. (@coderarity) -- [b9f7b61](https://github.com/bcoe/yargs/commit/b9f7b613b1e68e11e6c23fbda9e555a517dcc976) Add failing test for short aliased booleans. (@coderarity) - -### 0.3.3 (2012/04/30 06:45 +00:00) -- [541bac8](https://github.com/bcoe/yargs/commit/541bac8dd787a5f1a5d28f6d8deb1627871705e7) Fixes #37. - -### 0.3.2 (2012/04/12 20:28 +00:00) -- [3a0f014](https://github.com/bcoe/yargs/commit/3a0f014c1451280ac1c9caa1f639d31675586eec) travis badge (@substack) -- [4fb60bf](https://github.com/bcoe/yargs/commit/4fb60bf17845f4ce3293f8ca49c9a1a7c736cfce) Fix boolean aliases. (@coderarity) -- [f14dda5](https://github.com/bcoe/yargs/commit/f14dda546efc4fe06ace04d36919bfbb7634f79b) Adjusted package.json to use tap (@jfhbrook) -- [88e5d32](https://github.com/bcoe/yargs/commit/88e5d32295be6e544c8d355ff84e355af38a1c74) test/usage.js no longer hangs (@jfhbrook) -- [e1e740c](https://github.com/bcoe/yargs/commit/e1e740c27082f3ce84deca2093d9db2ef735d0e5) two tests for combined boolean/alias opts parsing (@jfhbrook) - -### 0.3.1 (2011/12/31 08:44 +00:00) -- [d09b719](https://github.com/bcoe/yargs/commit/d09b71980ef711b6cf3918cd19beec8257e40e82) If "default" is set to false it was not passed on, fixed. (@wolframkriesing) - -### 0.3.0 (2011/12/09 06:03 +00:00) -- [6e74aa7](https://github.com/bcoe/yargs/commit/6e74aa7b46a65773e20c0cb68d2d336d4a0d553d) bump and documented dot notation (@substack) - -### 0.2.7 (2011/10/20 02:25 +00:00) -- [94adee2](https://github.com/bcoe/yargs/commit/94adee20e17b58d0836f80e8b9cdbe9813800916) argv._ can be told 'Hey! argv._! Don't be messing with my args.', and it WILL obey (@colinta) -- [c46fdd5](https://github.com/bcoe/yargs/commit/c46fdd56a05410ae4a1e724a4820c82e77ff5469) optimistic critter image (@substack) -- [5c95c73](https://github.com/bcoe/yargs/commit/5c95c73aedf4c7482bd423e10c545e86d7c8a125) alias options() to option() (@substack) -- [f7692ea](https://github.com/bcoe/yargs/commit/f7692ea8da342850af819367833abb685fde41d8) [fix] Fix for parsing boolean edge case (@indexzero) -- [d1f92d1](https://github.com/bcoe/yargs/commit/d1f92d1425bd7f356055e78621b30cdf9741a3c2) -- [b01bda8](https://github.com/bcoe/yargs/commit/b01bda8d86e455bbf74ce497864cb8ab5b9fb847) [fix test] Update to ensure optimist is aware of default booleans. Associated tests included (@indexzero) -- [aa753e7](https://github.com/bcoe/yargs/commit/aa753e7c54fb3a12f513769a0ff6d54aa0f63943) [dist test] Update devDependencies in package.json. Update test pathing to be more npm and require.paths future-proof (@indexzero) -- [7bfce2f](https://github.com/bcoe/yargs/commit/7bfce2f3b3c98e6539e7549d35fbabced7e9341e) s/sys/util/ (@substack) -- [d420a7a](https://github.com/bcoe/yargs/commit/d420a7a9c890d2cdb11acfaf3ea3f43bc3e39f41) update usage output (@substack) -- [cf86eed](https://github.com/bcoe/yargs/commit/cf86eede2e5fc7495b6ec15e6d137d9ac814f075) some sage readme protips about parsing rules (@substack) -- [5da9f7a](https://github.com/bcoe/yargs/commit/5da9f7a5c0e1758ec7c5801fb3e94d3f6e970513) documented all the methods finally (@substack) -- [8ca6879](https://github.com/bcoe/yargs/commit/8ca6879311224b25933642987300f6a29de5c21b) fenced syntax highlighting (@substack) -- [b72bacf](https://github.com/bcoe/yargs/commit/b72bacf1d02594778c1935405bc8137eb61761dc) right-alignment of wrapped extra params (@substack) -- [2b980bf](https://github.com/bcoe/yargs/commit/2b980bf2656b4ee8fc5134dc5f56a48855c35198) now with .wrap() (@substack) -- [d614f63](https://github.com/bcoe/yargs/commit/d614f639654057d1b7e35e3f5a306e88ec2ad1e4) don't show 'Options:' when there aren't any (@substack) -- [691eda3](https://github.com/bcoe/yargs/commit/691eda354df97b5a86168317abcbcaabdc08a0fb) failing test for multi-aliasing (@substack) -- [0826c9f](https://github.com/bcoe/yargs/commit/0826c9f462109feab2bc7a99346d22e72bf774b7) "Options:" > "options:" (@substack) -- [72f7490](https://github.com/bcoe/yargs/commit/72f749025d01b7f295738ed370a669d885fbada0) [minor] Update formatting for `.showHelp()` (@indexzero) -- [75aecce](https://github.com/bcoe/yargs/commit/75aeccea74329094072f95800e02c275e7d999aa) options works again, too lazy to write a proper test right now (@substack) -- [f742e54](https://github.com/bcoe/yargs/commit/f742e5439817c662dc3bd8734ddd6467e6018cfd) line_count_options example, which breaks (@substack) -- [4ca06b8](https://github.com/bcoe/yargs/commit/4ca06b8b4ea99b5d5714b315a2a8576bee6e5537) line count example (@substack) -- [eeb8423](https://github.com/bcoe/yargs/commit/eeb8423e0a5ecc9dc3eb1e6df9f3f8c1c88f920b) remove self.argv setting in boolean (@substack) -- [6903412](https://github.com/bcoe/yargs/commit/69034126804660af9cc20ea7f4457b50338ee3d7) removed camel case for now (@substack) -- [5a0d88b](https://github.com/bcoe/yargs/commit/5a0d88bf23e9fa79635dd034e2a1aa992acc83cd) remove dead longest checking code (@substack) -- [d782170](https://github.com/bcoe/yargs/commit/d782170babf7284b1aa34f5350df0dd49c373fa8) .help() too (@substack) -- [622ec17](https://github.com/bcoe/yargs/commit/622ec17379bb5374fdbb190404c82bc600975791) rm old help generator (@substack) -- [7c8baac](https://github.com/bcoe/yargs/commit/7c8baac4d66195e9f5158503ea9ebfb61153dab7) nub keys (@substack) -- [8197785](https://github.com/bcoe/yargs/commit/8197785ad4762465084485b041abd722f69bf344) generate help message based on the previous calls, todo: nub (@substack) -- [3ffbdc3](https://github.com/bcoe/yargs/commit/3ffbdc33c8f5e83d4ea2ac60575ce119570c7ede) stub out new showHelp, better checks (@substack) -- [d4e21f5](https://github.com/bcoe/yargs/commit/d4e21f56a4830f7de841900d3c79756fb9886184) let .options() take single options too (@substack) -- [3c4cf29](https://github.com/bcoe/yargs/commit/3c4cf2901a29bac119cca8e983028d8669230ec6) .options() is now heaps simpler (@substack) -- [89f0d04](https://github.com/bcoe/yargs/commit/89f0d043cbccd302f10ab30c2069e05d2bf817c9) defaults work again, all tests pass (@substack) -- [dd87333](https://github.com/bcoe/yargs/commit/dd8733365423006a6e4156372ebb55f98323af58) update test error messages, down to 2 failing tests (@substack) -- [53f7bc6](https://github.com/bcoe/yargs/commit/53f7bc626b9875f2abdfc5dd7a80bde7f14143a3) fix for bools doubling up, passes the parse test again, others fail (@substack) -- [2213e2d](https://github.com/bcoe/yargs/commit/2213e2ddc7263226fba717fb041dc3fde9bc2ee4) refactored for an argv getter, failing several tests (@substack) -- [d1e7379](https://github.com/bcoe/yargs/commit/d1e737970f15c6c006bebdd8917706827ff2f0f2) just rescan for now, alias test passes (@substack) -- [b2f8c99](https://github.com/bcoe/yargs/commit/b2f8c99cc477a8eb0fdf4cf178e1785b63185cfd) failing alias test (@substack) -- [d0c0174](https://github.com/bcoe/yargs/commit/d0c0174daa144bfb6dc7290fdc448c393c475e15) .alias() (@substack) -- [d85f431](https://github.com/bcoe/yargs/commit/d85f431ad7d07b058af3f2a57daa51495576c164) [api] Remove `.describe()` in favor of building upon the existing `.usage()` API (@indexzero) -- [edbd527](https://github.com/bcoe/yargs/commit/edbd5272a8e213e71acd802782135c7f9699913a) [doc api] Add `.describe()`, `.options()`, and `.showHelp()` methods along with example. (@indexzero) -- [be4902f](https://github.com/bcoe/yargs/commit/be4902ff0961ae8feb9093f2c0a4066463ded2cf) updates for coffee since it now does argv the node way (@substack) -- [e24cb23](https://github.com/bcoe/yargs/commit/e24cb23798ee64e53b60815e7fda78b87f42390c) more general coffeescript detection (@substack) -- [78ac753](https://github.com/bcoe/yargs/commit/78ac753e5d0ec32a96d39d893272afe989e42a4d) Don't trigger the CoffeeScript hack when running under node_g. (@papandreou) -- [bcfe973](https://github.com/bcoe/yargs/commit/bcfe9731d7f90d4632281b8a52e8d76eb0195ae6) .string() but failing test (@substack) -- [1987aca](https://github.com/bcoe/yargs/commit/1987aca28c7ba4e8796c07bbc547cb984804c826) test hex strings (@substack) -- [ef36db3](https://github.com/bcoe/yargs/commit/ef36db32259b0b0d62448dc907c760e5554fb7e7) more keywords (@substack) -- [cc53c56](https://github.com/bcoe/yargs/commit/cc53c56329960bed6ab077a79798e991711ba01d) Added camelCase function that converts --multi-word-option to camel case (so it becomes argv.multiWordOption). (@papandreou) -- [60b57da](https://github.com/bcoe/yargs/commit/60b57da36797716e5783a633c6d5c79099016d45) fixed boolean bug by rescanning (@substack) -- [dff6d07](https://github.com/bcoe/yargs/commit/dff6d078d97f8ac503c7d18dcc7b7a8c364c2883) boolean examples (@substack) -- [0e380b9](https://github.com/bcoe/yargs/commit/0e380b92c4ef4e3c8dac1da18b5c31d85b1d02c9) boolean() with passing test (@substack) -- [62644d4](https://github.com/bcoe/yargs/commit/62644d4bffbb8d1bbf0c2baf58a1d14a6359ef07) coffee compatibility with node regex for versions too (@substack) -- [430fafc](https://github.com/bcoe/yargs/commit/430fafcf1683d23774772826581acff84b456827) argv._ fixed by fixing the coffee detection (@substack) -- [343b8af](https://github.com/bcoe/yargs/commit/343b8afefd98af274ebe21b5a16b3a949ec5429f) whichNodeArgs test fails too (@substack) -- [63df2f3](https://github.com/bcoe/yargs/commit/63df2f371f31e63d7f1dec2cbf0022a5f08da9d2) replicated mnot's bug in whichNodeEmpty test (@substack) -- [35473a4](https://github.com/bcoe/yargs/commit/35473a4d93a45e5e7e512af8bb54ebb532997ae1) test for ./bin usage (@substack) -- [13df151](https://github.com/bcoe/yargs/commit/13df151e44228eed10e5441c7cd163e086c458a4) don't coerce booleans to numbers (@substack) -- [85f8007](https://github.com/bcoe/yargs/commit/85f8007e93b8be7124feea64b1f1916d8ba1894a) package bump for automatic number conversion (@substack) -- [8f17014](https://github.com/bcoe/yargs/commit/8f170141cded4ccc0c6d67a849c5bf996aa29643) updated readme and examples with new auto-numberification goodness (@substack) -- [73dc901](https://github.com/bcoe/yargs/commit/73dc9011ac968e39b55e19e916084a839391b506) auto number conversion works yay (@substack) -- [bcec56b](https://github.com/bcoe/yargs/commit/bcec56b3d031e018064cbb691539ccc4f28c14ad) failing test for not-implemented auto numification (@substack) -- [ebd2844](https://github.com/bcoe/yargs/commit/ebd2844d683feeac583df79af0e5124a7a7db04e) odd that eql doesn't check types careflly (@substack) -- [fd854b0](https://github.com/bcoe/yargs/commit/fd854b02e512ce854b76386d395672a7969c1bc4) package author + keywords (@substack) -- [656a1d5](https://github.com/bcoe/yargs/commit/656a1d5a1b7c0e49d72e80cb13f20671d56f76c6) updated readme with .default() stuff (@substack) -- [cd7f8c5](https://github.com/bcoe/yargs/commit/cd7f8c55f0b82b79b690d14c5f806851236998a1) passing tests for new .default() behavior (@substack) -- [932725e](https://github.com/bcoe/yargs/commit/932725e39ce65bc91a0385a5fab659a5fa976ac2) new default() thing for setting default key/values (@substack) -- [4e6c7ab](https://github.com/bcoe/yargs/commit/4e6c7aba6374ac9ebc6259ecf91f13af7bce40e3) test for coffee usage (@substack) -- [d54ffcc](https://github.com/bcoe/yargs/commit/d54ffccf2a5a905f51ed5108f7c647f35d64ae23) new --key value style with passing tests. NOTE: changes existing behavior (@substack) -- [ed2a2d5](https://github.com/bcoe/yargs/commit/ed2a2d5d828100ebeef6385c0fb88d146a5cfe9b) package bump for summatix's coffee script fix (@substack) -- [75a975e](https://github.com/bcoe/yargs/commit/75a975eed8430d28e2a79dc9e6d819ad545f4587) Added support for CoffeeScript (@summatix) -- [56b2b1d](https://github.com/bcoe/yargs/commit/56b2b1de8d11f8a2b91979d8ae2d6db02d8fe64d) test coverage for the falsy check() usage (@substack) -- [a4843a9](https://github.com/bcoe/yargs/commit/a4843a9f0e69ffb4afdf6a671d89eb6f218be35d) check bug fixed plus a handy string (@substack) -- [857bd2d](https://github.com/bcoe/yargs/commit/857bd2db933a5aaa9cfecba0ced2dc9b415f8111) tests for demandCount, back up to 100% coverage (@substack) -- [073b776](https://github.com/bcoe/yargs/commit/073b7768ebd781668ef05c13f9003aceca2f5c35) call demandCount from demand (@substack) -- [4bd4b7a](https://github.com/bcoe/yargs/commit/4bd4b7a085c8b6ce1d885a0f486cc9865cee2db1) add demandCount to check for the number of arguments in the _ list (@marshall) -- [b8689ac](https://github.com/bcoe/yargs/commit/b8689ac68dacf248119d242bba39a41cb0adfa07) Rebase checks. That will be its own module eventually. (@substack) -- [e688370](https://github.com/bcoe/yargs/commit/e688370b576f0aa733c3f46183df69e1b561668e) a $0 like in perl (@substack) -- [2e5e196](https://github.com/bcoe/yargs/commit/2e5e1960fc19afb21fb3293752316eaa8bcd3609) usage test hacking around process and console (@substack) -- [fcc3521](https://github.com/bcoe/yargs/commit/fcc352163fbec6a1dfe8caf47a0df39de24fe016) description pun (@substack) -- [87a1fe2](https://github.com/bcoe/yargs/commit/87a1fe29037ca2ca5fefda85141aaeb13e8ce761) mit/x11 license (@substack) -- [8d089d2](https://github.com/bcoe/yargs/commit/8d089d24cd687c0bde3640a96c09b78f884900dd) bool example is more consistent and also shows off short option grouping (@substack) -- [448d747](https://github.com/bcoe/yargs/commit/448d7473ac68e8e03d8befc9457b0d9e21725be0) start of the readme and examples (@substack) -- [da74dea](https://github.com/bcoe/yargs/commit/da74dea799a9b59dbf022cbb8001bfdb0d52eec9) more tests for long and short captures (@substack) -- [ab6387e](https://github.com/bcoe/yargs/commit/ab6387e6769ca4af82ca94c4c67c7319f0d9fcfa) silly bug in the tests with s/not/no/, all tests pass now (@substack) -- [102496a](https://github.com/bcoe/yargs/commit/102496a319e8e06f6550d828fc2f72992c7d9ecc) hack an instance for process.argv onto Argv so the export can be called to create an instance or used for argv, which is the most common case (@substack) -- [a01caeb](https://github.com/bcoe/yargs/commit/a01caeb532546d19f68f2b2b87f7036cfe1aaedd) divide example (@substack) -- [443da55](https://github.com/bcoe/yargs/commit/443da55736acbaf8ff8b04d1b9ce19ab016ddda2) start of the lib with a package.json (@substack) diff --git a/node_modules/yargs/LICENSE b/node_modules/yargs/LICENSE deleted file mode 100644 index 432d1ae..0000000 --- a/node_modules/yargs/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright 2010 James Halliday (mail@substack.net) - -This project is free software released under the MIT/X11 license: - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/yargs/README.md b/node_modules/yargs/README.md deleted file mode 100644 index 4351723..0000000 --- a/node_modules/yargs/README.md +++ /dev/null @@ -1,1227 +0,0 @@ -yargs -======== - -Yargs be a node.js library fer hearties tryin' ter parse optstrings. - -With yargs, ye be havin' a map that leads straight to yer treasure! Treasure of course, being a simple option hash. - -[![Build Status][travis-image]][travis-url] -[![Dependency Status][gemnasium-image]][gemnasium-url] -[![Coverage Status][coveralls-image]][coveralls-url] -[![NPM version][npm-image]][npm-url] -[![Windows Tests][windows-image]][windows-url] - -> Yargs is the official successor to optimist. Please feel free to submit issues and pull requests. If you'd like to contribute and don't know where to start, have a look at [the issue list](https://github.com/bcoe/yargs/issues) :) - -examples -======== - -With yargs, the options be just a hash! -------------------------------------------------------------------- - -plunder.js: - -````javascript -#!/usr/bin/env node -var argv = require('yargs').argv; - -if (argv.ships > 3 && argv.distance < 53.5) { - console.log('Plunder more riffiwobbles!'); -} -else { - console.log('Retreat from the xupptumblers!'); -} -```` - -*** - - $ ./plunder.js --ships=4 --distance=22 - Plunder more riffiwobbles! - - $ ./plunder.js --ships 12 --distance 98.7 - Retreat from the xupptumblers! - -![Joe was one optimistic pirate.](http://i.imgur.com/4WFGVJ9.png) - -But don't walk the plank just yet! There be more! You can do short options: -------------------------------------------------- - -short.js: - -````javascript -#!/usr/bin/env node -var argv = require('yargs').argv; -console.log('(%d,%d)', argv.x, argv.y); -```` - -*** - - $ ./short.js -x 10 -y 21 - (10,21) - -And booleans, both long, short, and even grouped: ----------------------------------- - -bool.js: - -````javascript -#!/usr/bin/env node -var argv = require('yargs').argv; - -if (argv.s) { - process.stdout.write(argv.fr ? 'Le perroquet dit: ' : 'The parrot says: '); -} -console.log( - (argv.fr ? 'couac' : 'squawk') + (argv.p ? '!' : '') -); -```` - -*** - - $ ./bool.js -s - The parrot says: squawk - - $ ./bool.js -sp - The parrot says: squawk! - - $ ./bool.js -sp --fr - Le perroquet dit: couac! - -And non-hyphenated options too! Just use `argv._`! -------------------------------------------------- - -nonopt.js: - -````javascript -#!/usr/bin/env node -var argv = require('yargs').argv; -console.log('(%d,%d)', argv.x, argv.y); -console.log(argv._); -```` - -*** - - $ ./nonopt.js -x 6.82 -y 3.35 rum - (6.82,3.35) - [ 'rum' ] - - $ ./nonopt.js "me hearties" -x 0.54 yo -y 1.12 ho - (0.54,1.12) - [ 'me hearties', 'yo', 'ho' ] - -Yargs even counts your booleans! ----------------------------------------------------------------------- - -count.js: - -````javascript -#!/usr/bin/env node -var argv = require('yargs') - .count('verbose') - .alias('v', 'verbose') - .argv; - -VERBOSE_LEVEL = argv.verbose; - -function WARN() { VERBOSE_LEVEL >= 0 && console.log.apply(console, arguments); } -function INFO() { VERBOSE_LEVEL >= 1 && console.log.apply(console, arguments); } -function DEBUG() { VERBOSE_LEVEL >= 2 && console.log.apply(console, arguments); } - -WARN("Showing only important stuff"); -INFO("Showing semi-important stuff too"); -DEBUG("Extra chatty mode"); -```` - -*** - $ node count.js - Showing only important stuff - - $ node count.js -v - Showing only important stuff - Showing semi-important stuff too - - $ node count.js -vv - Showing only important stuff - Showing semi-important stuff too - Extra chatty mode - - $ node count.js -v --verbose - Showing only important stuff - Showing semi-important stuff too - Extra chatty mode - -Tell users how to use yer options and make demands. -------------------------------------------------- - -area.js: - -````javascript -#!/usr/bin/env node -var argv = require('yargs') - .usage('Usage: $0 -w [num] -h [num]') - .demand(['w','h']) - .argv; - -console.log("The area is:", argv.w * argv.h); -```` - -*** - - $ ./area.js -w 55 -h 11 - The area is: 605 - - $ node ./area.js -w 4.91 -w 2.51 - Usage: area.js -w [num] -h [num] - - Options: - -w [required] - -h [required] - - Missing required arguments: h - -After yer demands have been met, demand more! Ask for non-hyphenated arguments! ------------------------------------------ - -demand_count.js: - -````javascript -#!/usr/bin/env node -var argv = require('yargs') - .demand(2) - .argv; -console.dir(argv); -```` - -*** - - $ ./demand_count.js a - - Not enough non-option arguments: got 1, need at least 2 - - $ ./demand_count.js a b - { _: [ 'a', 'b' ], '$0': 'demand_count.js' } - - $ ./demand_count.js a b c - { _: [ 'a', 'b', 'c' ], '$0': 'demand_count.js' } - -EVEN MORE SHIVER ME TIMBERS! ------------------- - -default_singles.js: - -````javascript -#!/usr/bin/env node -var argv = require('yargs') - .default('x', 10) - .default('y', 10) - .argv -; -console.log(argv.x + argv.y); -```` - -*** - - $ ./default_singles.js -x 5 - 15 - -default_hash.js: - -````javascript -#!/usr/bin/env node -var argv = require('yargs') - .default({ x : 10, y : 10 }) - .argv -; -console.log(argv.x + argv.y); -```` - -*** - - $ ./default_hash.js -y 7 - 17 - -And if you really want to get all descriptive about it... ---------------------------------------------------------- - -boolean_single.js: - -````javascript -#!/usr/bin/env node -var argv = require('yargs') - .boolean('v') - .argv -; -console.dir(argv.v); -console.dir(argv._); -```` - -*** - - $ ./boolean_single.js -v "me hearties" yo ho - true - [ 'me hearties', 'yo', 'ho' ] - - -boolean_double.js: - -````javascript -#!/usr/bin/env node -var argv = require('yargs') - .boolean(['x','y','z']) - .argv -; -console.dir([ argv.x, argv.y, argv.z ]); -console.dir(argv._); -```` - -*** - - $ ./boolean_double.js -x -z one two three - [ true, false, true ] - [ 'one', 'two', 'three' ] - -Yargs is here to help you... ---------------------------- - -Ye can describe parameters fer help messages and set aliases. Yargs figures -out how ter format a handy help string automatically. - -line_count.js: - -````javascript -#!/usr/bin/env node -var argv = require('yargs') - .usage('Usage: $0 [options]') - .command('count', 'Count the lines in a file') - .demand(1) - .example('$0 count -f foo.js', 'count the lines in the given file') - .demand('f') - .alias('f', 'file') - .nargs('f', 1) - .describe('f', 'Load a file') - .help('h') - .alias('h', 'help') - .epilog('copyright 2015') - .argv; - -var fs = require('fs'); -var s = fs.createReadStream(argv.file); - -var lines = 0; -s.on('data', function (buf) { - lines += buf.toString().match(/\n/g).length; -}); - -s.on('end', function () { - console.log(lines); -}); -```` - -*** - $ node line_count.js count - Usage: line_count.js [options] - - Commands: - count Count the lines in a file - - Options: - -f, --file Load a file [required] - -h, --help Show help [boolean] - - Examples: - line_count.js count -f foo.js count the lines in the given file - - copyright 2015 - - Missing required arguments: f - - $ node line_count.js count --file line_count.js - 26 - - $ node line_count.js count -f line_count.js - 26 - -methods -======= - -By itself, - -````javascript -require('yargs').argv -```` - -will use the `process.argv` array to construct the `argv` object. - -You can pass in the `process.argv` yourself: - -````javascript -require('yargs')([ '-x', '1', '-y', '2' ]).argv -```` - -or use `.parse()` to do the same thing: - -````javascript -require('yargs').parse([ '-x', '1', '-y', '2' ]) -```` - -The rest of these methods below come in just before the terminating `.argv`. - -.alias(key, alias) ------------------- - -Set key names as equivalent such that updates to a key will propagate to aliases -and vice-versa. - -Optionally `.alias()` can take an object that maps keys to aliases. -Each key of this object should be the canonical version of the option, and each -value should be a string or an array of strings. - -.argv ------ - -Get the arguments as a plain old object. - -Arguments without a corresponding flag show up in the `argv._` array. - -The script name or node command is available at `argv.$0` similarly to how `$0` -works in bash or perl. - -If `yargs` is executed in an environment that embeds node and there's no script name (e.g. -[Electron](http://electron.atom.io/) or [nw.js](http://nwjs.io/)), it will ignore the first parameter since it -expects it to be the script name. In order to override this behavior, use `.parse(process.argv.slice(1))` -instead of `.argv` and the first parameter won't be ignored. - -.array(key) ----------- - -Tell the parser to interpret `key` as an array. If `.array('foo')` is set, -`--foo foo bar` will be parsed as `['foo', 'bar']` rather than as `'foo'`. - -.boolean(key) -------------- - -Interpret `key` as a boolean. If a non-flag option follows `key` in -`process.argv`, that string won't get set as the value of `key`. - -`key` will default to `false`, unless a `default(key, undefined)` is -explicitly set. - -If `key` is an array, interpret all the elements as booleans. - -.check(fn) ----------- - -Check that certain conditions are met in the provided arguments. - -`fn` is called with two arguments, the parsed `argv` hash and an array of options and their aliases. - -If `fn` throws or returns a non-truthy value, show the thrown error, usage information, and -exit. - -.choices(key, choices) ----------------------- - -Limit valid values for `key` to a predefined set of `choices`, given as an array -or as an individual value. - -```js -var argv = require('yargs') - .alias('i', 'ingredient') - .describe('i', 'choose your sandwich ingredients') - .choices('i', ['peanut-butter', 'jelly', 'banana', 'pickles']) - .help('help') - .argv -``` - -If this method is called multiple times, all enumerated values will be merged -together. Choices are generally strings or numbers, and value matching is -case-sensitive. - -Optionally `.choices()` can take an object that maps multiple keys to their -choices. - -Choices can also be specified as `choices` in the object given to `option()`. - -```js -var argv = require('yargs') - .option('size', { - alias: 's', - describe: 'choose a size', - choices: ['xs', 's', 'm', 'l', 'xl'] - }) - .argv -``` - -.command(cmd, desc, [fn]) -------------------- - -Document the commands exposed by your application. - -Use `desc` to provide a description for each command your application accepts (the -values stored in `argv._`). Set `desc` to `false` to create a hidden command. -Hidden commands don't show up in the help output and aren't available for -completion. - -Optionally, you can provide a handler `fn` which will be executed when -a given command is provided. The handler will be called with `yargs` and -`argv` as arguments. - -`yargs` is a blank instance of yargs, which can be used to compose a nested -hierarchy of options handlers. - -`argv` represents the arguments parsed prior to the -command being executed (those described in the outer yargs instance). - -Here's an example of top-level and nested commands in action: - -```js -var argv = require('yargs') - .usage('npm ') - .command('install', 'tis a mighty fine package to install') - .command('publish', 'shiver me timbers, should you be sharing all that', function (yargs, argv) { - argv = yargs.option('f', { - alias: 'force', - description: 'yar, it usually be a bad idea' - }) - .help('help') - .argv - }) - .help('help') - .argv; -``` - -.completion(cmd, [description], [fn]); -------------- - -Enable bash-completion shortcuts for commands and options. - -`cmd`: When present in `argv._`, will result in the `.bashrc` completion script -being outputted. To enable bash completions, concat the generated script to your -`.bashrc` or `.bash_profile`. - -`description`: Provide a description in your usage instructions for the command -that generates bash completion scripts. - -`fn`: Rather than relying on yargs' default completion functionality, which -shiver me timbers is pretty awesome, you can provide your own completion -method. - -```js -var argv = require('yargs') - .completion('completion', function(current, argv) { - // 'current' is the current command being completed. - // 'argv' is the parsed arguments so far. - // simply return an array of completions. - return [ - 'foo', - 'bar' - ]; - }) - .argv; -``` - -You can also provide asynchronous completions. - -```js -var argv = require('yargs') - .completion('completion', function(current, argv, done) { - setTimeout(function() { - done([ - 'apple', - 'banana' - ]); - }, 500); - }) - .argv; -``` - -But wait, there's more! You can return an asynchronous promise. - -```js -var argv = require('yargs') - .completion('completion', function(current, argv, done) { - return new Promise(function (resolve, reject) { - setTimeout(function () { - resolve(['apple', 'banana']) - }, 10) - }) - }) - .argv; -``` - -.config(key, [description]) ------------- - -Tells the parser that if the option specified by `key` is passed in, it -should be interpreted as a path to a JSON config file. The file is loaded -and parsed, and its properties are set as arguments. If present, the -`description` parameter customizes the description of the config (`key`) option -in the usage string. - -.count(key) ------------- - -Interpret `key` as a boolean flag, but set its parsed value to the number of -flag occurrences rather than `true` or `false`. Default value is thus `0`. - -.default(key, value, [description]) --------------------- - -Set `argv[key]` to `value` if no option was specified in `process.argv`. - -Optionally `.default()` can take an object that maps keys to default values. - -But wait, there's more! The default value can be a `function` which returns -a value. The name of the function will be used in the usage string: - -```js -var argv = require('yargs') - .default('random', function randomValue() { - return Math.random() * 256; - }).argv; -``` - -Optionally, `description` can also be provided and will take precedence over -displaying the value in the usage instructions: - -```js -.default('timeout', 60000, '(one-minute)') -``` - -.demand(key, [msg | boolean]) ------------------------------- -.demand(count, [max], [msg]) ------------------------------- - -If `key` is a string, show the usage information and exit if `key` wasn't -specified in `process.argv`. - -If `key` is a number, demand at least as many non-option arguments, which show -up in `argv._`. A second number can also optionally be provided, which indicates -the maximum number of non-option arguments. - -If `key` is an array, demand each element. - -If a `msg` string is given, it will be printed when the argument is missing, -instead of the standard error message. This is especially helpful for the non-option arguments in `argv._`. - -If a `boolean` value is given, it controls whether the option is demanded; -this is useful when using `.options()` to specify command line parameters. - -.describe(key, desc) --------------------- - -Describe a `key` for the generated usage information. - -Optionally `.describe()` can take an object that maps keys to descriptions. - -.detectLocale(boolean) ------------ - -Should yargs attempt to detect the os' locale? Defaults to `true`. - -.env([prefix]) --------------- - -Tell yargs to parse environment variables matching the given prefix and apply -them to argv as though they were command line arguments. - -If this method is called with no argument or with an empty string or with `true`, -then all env vars will be applied to argv. - -Program arguments are defined in this order of precedence: - -1. Command line args -2. Config file -3. Env var -4. Configured defaults - -```js -var argv = require('yargs') - .env('MY_PROGRAM') - .option('f', { - alias: 'fruit-thing', - default: 'apple' - }) - .argv -console.log(argv) -``` - -``` -$ node fruity.js -{ _: [], - f: 'apple', - 'fruit-thing': 'apple', - fruitThing: 'apple', - '$0': 'fruity.js' } -``` - -``` -$ MY_PROGRAM_FRUIT_THING=banana node fruity.js -{ _: [], - fruitThing: 'banana', - f: 'banana', - 'fruit-thing': 'banana', - '$0': 'fruity.js' } -``` - -``` -$ MY_PROGRAM_FRUIT_THING=banana node fruity.js -f cat -{ _: [], - f: 'cat', - 'fruit-thing': 'cat', - fruitThing: 'cat', - '$0': 'fruity.js' } -``` - -Env var parsing is disabled by default, but you can also explicitly disable it -by calling `.env(false)`, e.g. if you need to undo previous configuration. - -.epilog(str) ------------- -.epilogue(str) --------------- - -A message to print at the end of the usage instructions, e.g. - -```js -var argv = require('yargs') - .epilogue('for more information, find our manual at http://example.com'); -``` - -.example(cmd, desc) -------------------- - -Give some example invocations of your program. Inside `cmd`, the string -`$0` will get interpolated to the current script name or node command for the -present script similar to how `$0` works in bash or perl. -Examples will be printed out as part of the help message. - -.exitProcess(enable) ----------------------------------- - -By default, yargs exits the process when the user passes a help flag, uses the -`.version` functionality, or when validation fails. Calling -`.exitProcess(false)` disables this behavior, enabling further actions after -yargs have been validated. - -.fail(fn) ---------- - -Method to execute when a failure occurs, rather than printing the failure message. - -`fn` is called with the failure message that would have been printed. - -.group(key(s), groupName) --------------------- - -Given a key, or an array of keys, places options under an alternative heading -when displaying usage instructions, e.g., - -```js -var yargs = require('yargs')(['--help']) - .help('help') - .group('batman', 'Heroes:') - .describe('batman', "world's greatest detective") - .wrap(null) - .argv -``` -*** - Heroes: - --batman world's greatest detective - - Options: - --help Show help [boolean] - -.help([option, [description]]) ------------------------------- - -Add an option (e.g. `--help`) that displays the usage string and exits the -process. If present, the `description` parameter customizes the description of -the help option in the usage string. - -If invoked without parameters, `.help()` returns the generated usage string. - -Example: - -```js -var yargs = require("yargs") - .usage("$0 -operand1 number -operand2 number -operation [add|subtract]"); -console.log(yargs.help()); -``` - -Later on, `argv` can be retrieved with `yargs.argv`. - -.implies(x, y) --------------- - -Given the key `x` is set, it is required that the key `y` is set. - -Optionally `.implies()` can accept an object specifying multiple implications. - -.locale() ---------- - -Return the locale that yargs is currently using. - -By default, yargs will auto-detect the operating system's locale so that -yargs-generated help content will display in the user's language. - -To override this behavior with a static locale, pass the desired locale as a -string to this method (see below). - -.locale(locale) ---------------- - -Override the auto-detected locale from the user's operating system with a static -locale. Note that the OS locale can be modified by setting/exporting the `LC_ALL` -environment variable. - -```js -var argv = require('yargs') - .usage('./$0 - follow ye instructions true') - .option('option', { - alias: 'o', - describe: "'tis a mighty fine option", - demand: true - }) - .command('run', "Arrr, ya best be knowin' what yer doin'") - .example('$0 run foo', "shiver me timbers, here's an example for ye") - .help('help') - .wrap(70) - .locale('pirate') - .argv -``` - -*** - -```shell -./test.js - follow ye instructions true - -Choose yer command: - run Arrr, ya best be knowin' what yer doin' - -Options for me hearties! - --option, -o 'tis a mighty fine option [requi-yar-ed] - --help Parlay this here code of conduct [boolean] - -Ex. marks the spot: - test.js run foo shiver me timbers, here's an example for ye - -Ye be havin' to set the followin' argument land lubber: option -``` - -Locales currently supported: - -* **de:** German. -* **en:** American English. -* **es:** Spanish. -* **fr:** French. -* **id:** Indonesian. -* **ja:** Japanese. -* **ko:** Korean. -* **nb:** Norwegian Bokmål. -* **pirate:** American Pirate. -* **pt:** Portuguese. -* **pt_BR:** Brazilian Portuguese. -* **tr:** Turkish. -* **zh:** Chinese. - -To submit a new translation for yargs: - -1. use `./locales/en.json` as a starting point. -2. submit a pull request with the new locale file. - -*The [Microsoft Terminology Search](http://www.microsoft.com/Language/en-US/Search.aspx) can be useful for finding the correct terminology in your locale.* - -.nargs(key, count) ------------ - -The number of arguments that should be consumed after a key. This can be a -useful hint to prevent parsing ambiguity. For example: - -```js -var argv = require('yargs') - .nargs('token', 1) - .parse(['--token', '-my-token']); -``` - -parses as: - -`{ _: [], token: '-my-token', '$0': 'node test' }` - -Optionally `.nargs()` can take an object of `key`/`narg` pairs. - -.option(key, opt) ------------------ -.options(key, opt) ------------------- - -Instead of chaining together `.alias().demand().default().describe().string()`, you can specify -keys in `opt` for each of the chainable methods. - -For example: - -````javascript -var argv = require('yargs') - .option('f', { - alias: 'file', - demand: true, - default: '/etc/passwd', - describe: 'x marks the spot', - type: 'string' - }) - .argv -; -```` - -is the same as - -````javascript -var argv = require('yargs') - .alias('f', 'file') - .demand('f') - .default('f', '/etc/passwd') - .describe('f', 'x marks the spot') - .string('f') - .argv -; -```` - -Optionally `.options()` can take an object that maps keys to `opt` parameters. - -````javascript -var argv = require('yargs') - .options({ - 'f': { - alias: 'file', - demand: true, - default: '/etc/passwd', - describe: 'x marks the spot', - type: 'string' - } - }) - .argv -; -```` - -Valid `opt` keys include: - -- `alias`: string or array of strings, alias(es) for the canonical option key, see [`alias()`](#alias) -- `array`: boolean, interpret option as an array, see [`array()`](#array) -- `boolean`: boolean, interpret option as a boolean flag, see [`boolean()`](#boolean) -- `choices`: value or array of values, limit valid option arguments to a predefined set, see [`choices()`](#choices) -- `config`: boolean, interpret option as a path to a JSON config file, see [`config()`](#config) -- `count`: boolean, interpret option as a count of boolean flags, see [`count()`](#count) -- `default`: value, set a default value for the option, see [`default()`](#default) -- `defaultDescription`: string, use this description for the default value in help content, see [`default()`](#default) -- `demand`/`require`/`required`: boolean or string, demand the option be given, with optional error message, see [`demand()`](#demand) -- `desc`/`describe`/`description`: string, the option description for help content, see [`describe()`](#describe) -- `group`: string, when displaying usage instructions place the option under an alternative group heading, see [`group()`](#group) -- `nargs`: number, specify how many arguments should be consumed for the option, see [`nargs()`](#nargs) -- `requiresArg`: boolean, require the option be specified with a value, see [`requiresArg()`](#requiresArg) -- `string`: boolean, interpret option as a string, see [`string()`](#string) -- `type`: one of the following strings - - `'array'`: synonymous for `array: true`, see [`array()`](#array) - - `'boolean'`: synonymous for `boolean: true`, see [`boolean()`](#boolean) - - `'count'`: synonymous for `count: true`, see [`count()`](#count) - - `'string'`: synonymous for `string: true`, see [`string()`](#string) - -.parse(args) ------------- - -Parse `args` instead of `process.argv`. Returns the `argv` object. - -.require(key, [msg | boolean]) ------------------------------- -.required(key, [msg | boolean]) ------------------------------- - -An alias for [`demand()`](#demand). See docs there. - -.requiresArg(key) ------------------ - -Specifies either a single option key (string), or an array of options that -must be followed by option values. If any option value is missing, show the -usage information and exit. - -The default behavior is to set the value of any key not followed by an -option value to `true`. - -.reset() --------- - -Reset the argument object built up so far. This is useful for -creating nested command line interfaces. - -```js -var yargs = require('yargs') - .usage('$0 command') - .command('hello', 'hello command') - .command('world', 'world command') - .demand(1, 'must provide a valid command'), - argv = yargs.argv, - command = argv._[0]; - -if (command === 'hello') { - yargs.reset() - .usage('$0 hello') - .help('h') - .example('$0 hello', 'print the hello message!') - .argv - - console.log('hello!'); -} else if (command === 'world'){ - yargs.reset() - .usage('$0 world') - .help('h') - .example('$0 world', 'print the world message!') - .argv - - console.log('world!'); -} else { - yargs.showHelp(); -} -``` - -.showCompletionScript() ----------------------- - -Generate a bash completion script. Users of your application can install this -script in their `.bashrc`, and yargs will provide completion shortcuts for -commands and options. - -.showHelp(consoleLevel='error') ---------------------------- - -Print the usage data using the [`console`](https://nodejs.org/api/console.html) function `consoleLevel` for printing. - -Example: - -```js -var yargs = require("yargs") - .usage("$0 -operand1 number -operand2 number -operation [add|subtract]"); -yargs.showHelp(); //prints to stderr using console.error() -``` - -Or, to print the usage data to `stdout` instead, you can specify the use of `console.log`: - -```js -yargs.showHelp("log"); //prints to stdout using console.log() -``` - -Later on, `argv` can be retrieved with `yargs.argv`. - -.showHelpOnFail(enable, [message]) ----------------------------------- - -By default, yargs outputs a usage string if any error is detected. Use the -`.showHelpOnFail()` method to customize this behavior. If `enable` is `false`, -the usage string is not output. If the `message` parameter is present, this -message is output after the error message. - -line_count.js: - -````javascript -#!/usr/bin/env node -var argv = require('yargs') - .usage('Count the lines in a file.\nUsage: $0 -f ') - .demand('f') - .alias('f', 'file') - .describe('f', 'Load a file') - .string('f') - .showHelpOnFail(false, 'Specify --help for available options') - .help('help') - .argv; - -// etc. -```` - -*** - -``` -$ node line_count.js -Missing argument value: f - -Specify --help for available options -``` - -.strict() ---------- - -Any command-line argument given that is not demanded, or does not have a -corresponding description, will be reported as an error. - -.string(key) ------------- - -Tell the parser logic not to interpret `key` as a number or boolean. -This can be useful if you need to preserve leading zeros in an input. - -If `key` is an array, interpret all the elements as strings. - -`.string('_')` will result in non-hyphenated arguments being interpreted as strings, -regardless of whether they resemble numbers. - -.updateLocale(obj) ------------------- -.updateStrings(obj) ------------------- - -Override the default strings used by yargs with the key/value -pairs provided in `obj`: - -```js -var argv = require('yargs') - .command('run', 'the run command') - .help('help') - .updateStrings({ - 'Commands:': 'My Commands -->\n' - }) - .wrap(null) - .argv -``` - -*** - -```shell -My Commands --> - - run the run command - -Options: - --help Show help [boolean] -``` - -If you explicitly specify a `locale()`, you should do so *before* calling -`updateStrings()`. - -.usage(message, [opts]) ---------------------- - -Set a usage message to show which commands to use. Inside `message`, the string -`$0` will get interpolated to the current script name or node command for the -present script similar to how `$0` works in bash or perl. - -`opts` is optional and acts like calling `.options(opts)`. - -.version(version, [option], [description]) ----------------------------------------- - -Add an option (e.g. `--version`) that displays the version number (given by the -`version` parameter) and exits the process. If present, the `description` -parameter customizes the description of the version option in the usage string. - -You can provide a `function` for version, rather than a string. -This is useful if you want to use the version from your package.json: - -```js -var argv = require('yargs') - .version(function() { - return require('../package').version; - }) - .argv; -``` - -.wrap(columns) --------------- - -Format usage output to wrap at `columns` many columns. - -By default wrap will be set to `Math.min(80, windowWidth)`. Use `.wrap(null)` to -specify no column limit (no right-align). Use `.wrap(yargs.terminalWidth())` to -maximize the width of yargs' usage instructions. - -parsing tricks -============== - -stop parsing ------------- - -Use `--` to stop parsing flags and stuff the remainder into `argv._`. - - $ node examples/reflect.js -a 1 -b 2 -- -c 3 -d 4 - { _: [ '-c', '3', '-d', '4' ], - a: 1, - b: 2, - '$0': 'examples/reflect.js' } - -negate fields -------------- - -If you want to explicitly set a field to false instead of just leaving it -undefined or to override a default you can do `--no-key`. - - $ node examples/reflect.js -a --no-b - { _: [], a: true, b: false, '$0': 'examples/reflect.js' } - -numbers -------- - -Every argument that looks like a number (`!isNaN(Number(arg))`) is converted to -one. This way you can just `net.createConnection(argv.port)` and you can add -numbers out of `argv` with `+` without having that mean concatenation, -which is super frustrating. - -duplicates ----------- - -If you specify a flag multiple times it will get turned into an array containing -all the values in order. - - $ node examples/reflect.js -x 5 -x 8 -x 0 - { _: [], x: [ 5, 8, 0 ], '$0': 'examples/reflect.js' } - -dot notation ------------- - -When you use dots (`.`s) in argument names, an implicit object path is assumed. -This lets you organize arguments into nested objects. - - $ node examples/reflect.js --foo.bar.baz=33 --foo.quux=5 - { _: [], - foo: { bar: { baz: 33 }, quux: 5 }, - '$0': 'examples/reflect.js' } - -short numbers -------------- - -Short numeric `-n5` style arguments work too: - - $ node examples/reflect.js -n123 -m456 - { _: [], n: 123, m: 456, '$0': 'examples/reflect.js' } - -installation -============ - -With [npm](https://github.com/npm/npm), just do: - - npm install yargs - -or clone this project on github: - - git clone http://github.com/bcoe/yargs.git - -To run the tests with npm, just do: - - npm test - -inspired by -=========== - -This module is loosely inspired by Perl's -[Getopt::Casual](http://search.cpan.org/~photo/Getopt-Casual-0.13.1/Casual.pm). - - - -[travis-url]: https://travis-ci.org/bcoe/yargs -[travis-image]: https://img.shields.io/travis/bcoe/yargs.svg -[gemnasium-url]: https://gemnasium.com/bcoe/yargs -[gemnasium-image]: https://img.shields.io/gemnasium/bcoe/yargs.svg -[coveralls-url]: https://coveralls.io/github/bcoe/yargs -[coveralls-image]: https://img.shields.io/coveralls/bcoe/yargs.svg -[npm-url]: https://www.npmjs.com/package/yargs -[npm-image]: https://img.shields.io/npm/v/yargs.svg -[windows-url]: https://ci.appveyor.com/project/bcoe/yargs -[windows-image]: https://img.shields.io/appveyor/ci/bcoe/yargs/master.svg?label=Windows%20Tests diff --git a/node_modules/yargs/completion.sh.hbs b/node_modules/yargs/completion.sh.hbs deleted file mode 100644 index 8392ad5..0000000 --- a/node_modules/yargs/completion.sh.hbs +++ /dev/null @@ -1,28 +0,0 @@ -###-begin-{{app_name}}-completions-### -# -# yargs command completion script -# -# Installation: {{app_path}} completion >> ~/.bashrc -# or {{app_path}} completion >> ~/.bash_profile on OSX. -# -_yargs_completions() -{ - local cur_word args type_list - - cur_word="${COMP_WORDS[COMP_CWORD]}" - args=$(printf "%s " "${COMP_WORDS[@]}") - - # ask yargs to generate completions. - type_list=`{{app_path}} --get-yargs-completions $args` - - COMPREPLY=( $(compgen -W "${type_list}" -- ${cur_word}) ) - - # if no match was found, fall back to filename completion - if [ ${#COMPREPLY[@]} -eq 0 ]; then - COMPREPLY=( $(compgen -f -- "${cur_word}" ) ) - fi - - return 0 -} -complete -F _yargs_completions {{app_name}} -###-end-{{app_name}}-completions-### diff --git a/node_modules/yargs/index.js b/node_modules/yargs/index.js deleted file mode 100644 index 276de68..0000000 --- a/node_modules/yargs/index.js +++ /dev/null @@ -1,644 +0,0 @@ -var assert = require('assert') -var Completion = require('./lib/completion') -var Parser = require('./lib/parser') -var path = require('path') -var Usage = require('./lib/usage') -var Validation = require('./lib/validation') -var Y18n = require('y18n') - -Argv(process.argv.slice(2)) - -var exports = module.exports = Argv -function Argv (processArgs, cwd) { - processArgs = processArgs || [] // handle calling yargs(). - - var self = {} - var completion = null - var usage = null - var validation = null - var y18n = Y18n({ - directory: path.resolve(__dirname, './locales'), - updateFiles: false - }) - - if (!cwd) cwd = process.cwd() - - self.$0 = process.argv - .slice(0, 2) - .map(function (x, i) { - // ignore the node bin, specify this in your - // bin file with #!/usr/bin/env node - if (i === 0 && /\b(node|iojs)$/.test(x)) return - var b = rebase(cwd, x) - return x.match(/^\//) && b.length < x.length ? b : x - }) - .join(' ').trim() - - if (process.env._ !== undefined && process.argv[1] === process.env._) { - self.$0 = process.env._.replace( - path.dirname(process.execPath) + '/', '' - ) - } - - var options - self.resetOptions = self.reset = function () { - // put yargs back into its initial - // state, this is useful for creating a - // nested CLI. - options = { - array: [], - boolean: [], - string: [], - narg: {}, - key: {}, - alias: {}, - default: {}, - defaultDescription: {}, - choices: {}, - requiresArg: [], - count: [], - normalize: [], - config: [], - envPrefix: undefined - } - - usage = Usage(self, y18n) // handle usage output. - validation = Validation(self, usage, y18n) // handle arg validation. - completion = Completion(self, usage) - - demanded = {} - - exitProcess = true - strict = false - helpOpt = null - versionOpt = null - commandHandlers = {} - self.parsed = false - - return self - } - self.resetOptions() - - self.boolean = function (bools) { - options.boolean.push.apply(options.boolean, [].concat(bools)) - return self - } - - self.array = function (arrays) { - options.array.push.apply(options.array, [].concat(arrays)) - return self - } - - self.nargs = function (key, n) { - if (typeof key === 'object') { - Object.keys(key).forEach(function (k) { - self.nargs(k, key[k]) - }) - } else { - options.narg[key] = n - } - return self - } - - self.choices = function (key, values) { - if (typeof key === 'object') { - Object.keys(key).forEach(function (k) { - self.choices(k, key[k]) - }) - } else { - options.choices[key] = (options.choices[key] || []).concat(values) - } - return self - } - - self.normalize = function (strings) { - options.normalize.push.apply(options.normalize, [].concat(strings)) - return self - } - - self.config = function (key, msg) { - self.describe(key, msg || usage.deferY18nLookup('Path to JSON config file')) - options.config.push.apply(options.config, [].concat(key)) - return self - } - - self.example = function (cmd, description) { - usage.example(cmd, description) - return self - } - - self.command = function (cmd, description, fn) { - if (description !== false) { - usage.command(cmd, description) - } - if (fn) commandHandlers[cmd] = fn - return self - } - - var commandHandlers = {} - self.getCommandHandlers = function () { - return commandHandlers - } - - self.string = function (strings) { - options.string.push.apply(options.string, [].concat(strings)) - return self - } - - self.default = function (key, value, defaultDescription) { - if (typeof key === 'object') { - Object.keys(key).forEach(function (k) { - self.default(k, key[k]) - }) - } else { - if (defaultDescription) options.defaultDescription[key] = defaultDescription - if (typeof value === 'function') { - if (!options.defaultDescription[key]) options.defaultDescription[key] = usage.functionDescription(value) - value = value.call() - } - options.default[key] = value - } - return self - } - - self.alias = function (x, y) { - if (typeof x === 'object') { - Object.keys(x).forEach(function (key) { - self.alias(key, x[key]) - }) - } else { - // perhaps 'x' is already an alias in another list? - // if so we should append to x's list. - var aliases = null - Object.keys(options.alias).forEach(function (key) { - if (~options.alias[key].indexOf(x)) aliases = options.alias[key] - }) - - if (aliases) { // x was an alias itself. - aliases.push(y) - } else { // x is a new alias key. - options.alias[x] = (options.alias[x] || []).concat(y) - } - - // wait! perhaps we've created two lists of aliases - // that reference each other? - if (options.alias[y]) { - Array.prototype.push.apply((options.alias[x] || aliases), options.alias[y]) - delete options.alias[y] - } - } - return self - } - - self.count = function (counts) { - options.count.push.apply(options.count, [].concat(counts)) - return self - } - - var demanded = {} - self.demand = self.required = self.require = function (keys, max, msg) { - // you can optionally provide a 'max' key, - // which will raise an exception if too many '_' - // options are provided. - if (typeof max !== 'number') { - msg = max - max = Infinity - } - - if (typeof keys === 'number') { - if (!demanded._) demanded._ = { count: 0, msg: null, max: max } - demanded._.count = keys - demanded._.msg = msg - } else if (Array.isArray(keys)) { - keys.forEach(function (key) { - self.demand(key, msg) - }) - } else { - if (typeof msg === 'string') { - demanded[keys] = { msg: msg } - } else if (msg === true || typeof msg === 'undefined') { - demanded[keys] = { msg: undefined } - } - } - - return self - } - self.getDemanded = function () { - return demanded - } - - self.requiresArg = function (requiresArgs) { - options.requiresArg.push.apply(options.requiresArg, [].concat(requiresArgs)) - return self - } - - self.implies = function (key, value) { - validation.implies(key, value) - return self - } - - self.usage = function (msg, opts) { - if (!opts && typeof msg === 'object') { - opts = msg - msg = null - } - - usage.usage(msg) - - if (opts) self.options(opts) - - return self - } - - self.epilogue = self.epilog = function (msg) { - usage.epilog(msg) - return self - } - - self.fail = function (f) { - usage.failFn(f) - return self - } - - self.check = function (f) { - validation.check(f) - return self - } - - self.defaults = self.default - - self.describe = function (key, desc) { - options.key[key] = true - usage.describe(key, desc) - return self - } - - self.parse = function (args) { - return parseArgs(args) - } - - self.option = self.options = function (key, opt) { - if (typeof key === 'object') { - Object.keys(key).forEach(function (k) { - self.options(k, key[k]) - }) - } else { - assert(typeof opt === 'object', 'second argument to option must be an object') - - options.key[key] = true // track manually set keys. - - if (opt.alias) self.alias(key, opt.alias) - - var demand = opt.demand || opt.required || opt.require - - if (demand) { - self.demand(key, demand) - } if ('config' in opt) { - self.config(key) - } if ('default' in opt) { - self.default(key, opt.default) - } if ('nargs' in opt) { - self.nargs(key, opt.nargs) - } if ('choices' in opt) { - self.choices(key, opt.choices) - } if ('group' in opt) { - self.group(key, opt.group) - } if (opt.boolean || opt.type === 'boolean') { - self.boolean(key) - if (opt.alias) self.boolean(opt.alias) - } if (opt.array || opt.type === 'array') { - self.array(key) - if (opt.alias) self.array(opt.alias) - } if (opt.string || opt.type === 'string') { - self.string(key) - if (opt.alias) self.string(opt.alias) - } if (opt.count || opt.type === 'count') { - self.count(key) - } if (opt.defaultDescription) { - options.defaultDescription[key] = opt.defaultDescription - } - - var desc = opt.describe || opt.description || opt.desc - if (desc) { - self.describe(key, desc) - } - - if (opt.requiresArg) { - self.requiresArg(key) - } - } - - return self - } - self.getOptions = function () { - return options - } - - var groups = {} - self.group = function (opts, groupName) { - groups[groupName] = (groups[groupName] || []).concat(opts) - return self - } - self.getGroups = function () { - return groups - } - - // as long as options.envPrefix is not undefined, - // parser will apply env vars matching prefix to argv - self.env = function (prefix) { - if (prefix === false) options.envPrefix = undefined - else options.envPrefix = prefix || '' - return self - } - - self.wrap = function (cols) { - usage.wrap(cols) - return self - } - - var strict = false - self.strict = function () { - strict = true - return self - } - self.getStrict = function () { - return strict - } - - self.showHelp = function (level) { - if (!self.parsed) parseArgs(processArgs) // run parser, if it has not already been executed. - usage.showHelp(level) - return self - } - - var versionOpt = null - self.version = function (ver, opt, msg) { - versionOpt = opt || 'version' - usage.version(ver) - self.boolean(versionOpt) - self.describe(versionOpt, msg || usage.deferY18nLookup('Show version number')) - return self - } - - var helpOpt = null - self.addHelpOpt = function (opt, msg) { - helpOpt = opt - self.boolean(opt) - self.describe(opt, msg || usage.deferY18nLookup('Show help')) - return self - } - - self.showHelpOnFail = function (enabled, message) { - usage.showHelpOnFail(enabled, message) - return self - } - - var exitProcess = true - self.exitProcess = function (enabled) { - if (typeof enabled !== 'boolean') { - enabled = true - } - exitProcess = enabled - return self - } - self.getExitProcess = function () { - return exitProcess - } - - self.help = function () { - if (arguments.length > 0) return self.addHelpOpt.apply(self, arguments) - - if (!self.parsed) parseArgs(processArgs) // run parser, if it has not already been executed. - - return usage.help() - } - - var completionCommand = null - self.completion = function (cmd, desc, fn) { - // a function to execute when generating - // completions can be provided as the second - // or third argument to completion. - if (typeof desc === 'function') { - fn = desc - desc = null - } - - // register the completion command. - completionCommand = cmd || 'completion' - if (!desc && desc !== false) { - desc = 'generate bash completion script' - } - self.command(completionCommand, desc) - - // a function can be provided - if (fn) completion.registerFunction(fn) - - return self - } - - self.showCompletionScript = function ($0) { - $0 = $0 || self.$0 - console.log(completion.generateCompletionScript($0)) - return self - } - - self.locale = function (locale) { - if (arguments.length === 0) { - guessLocale() - return y18n.getLocale() - } - detectLocale = false - y18n.setLocale(locale) - return self - } - - self.updateStrings = self.updateLocale = function (obj) { - detectLocale = false - y18n.updateLocale(obj) - return self - } - - var detectLocale = true - self.detectLocale = function (detect) { - detectLocale = detect - return self - } - self.getDetectLocale = function () { - return detectLocale - } - - self.getUsageInstance = function () { - return usage - } - - self.getValidationInstance = function () { - return validation - } - - self.terminalWidth = function () { - return require('window-size').width - } - - Object.defineProperty(self, 'argv', { - get: function () { - var args = null - - try { - args = parseArgs(processArgs) - } catch (err) { - usage.fail(err.message) - } - - return args - }, - enumerable: true - }) - - function parseArgs (args) { - var parsed = Parser(args, options, y18n) - var argv = parsed.argv - var aliases = parsed.aliases - - argv.$0 = self.$0 - - self.parsed = parsed - - guessLocale() // guess locale lazily, so that it can be turned off in chain. - - // while building up the argv object, there - // are two passes through the parser. If completion - // is being performed short-circuit on the first pass. - if (completionCommand && - (process.argv.join(' ')).indexOf(completion.completionKey) !== -1 && - !argv[completion.completionKey]) { - return argv - } - - // if there's a handler associated with a - // command defer processing to it. - var handlerKeys = Object.keys(self.getCommandHandlers()) - for (var i = 0, command; (command = handlerKeys[i]) !== undefined; i++) { - if (~argv._.indexOf(command)) { - runCommand(command, self, argv) - return self.argv - } - } - - // generate a completion script for adding to ~/.bashrc. - if (completionCommand && ~argv._.indexOf(completionCommand) && !argv[completion.completionKey]) { - self.showCompletionScript() - if (exitProcess) { - process.exit(0) - } - } - - // we must run completions first, a user might - // want to complete the --help or --version option. - if (completion.completionKey in argv) { - // we allow for asynchronous completions, - // e.g., loading in a list of commands from an API. - completion.getCompletion(function (completions) { - ;(completions || []).forEach(function (completion) { - console.log(completion) - }) - - if (exitProcess) { - process.exit(0) - } - }) - return - } - - var helpOrVersion = false - Object.keys(argv).forEach(function (key) { - if (key === helpOpt && argv[key]) { - helpOrVersion = true - self.showHelp('log') - if (exitProcess) { - process.exit(0) - } - } else if (key === versionOpt && argv[key]) { - helpOrVersion = true - usage.showVersion() - if (exitProcess) { - process.exit(0) - } - } - }) - - // If the help or version options where used and exitProcess is false, - // we won't run validations - if (!helpOrVersion) { - if (parsed.error) throw parsed.error - - // if we're executed via bash completion, don't - // bother with validation. - if (!argv[completion.completionKey]) { - validation.nonOptionCount(argv) - validation.missingArgumentValue(argv) - validation.requiredArguments(argv) - if (strict) validation.unknownArguments(argv, aliases) - validation.customChecks(argv, aliases) - validation.limitedChoices(argv) - validation.implications(argv) - } - } - - setPlaceholderKeys(argv) - - return argv - } - - function guessLocale () { - if (!detectLocale) return - - try { - var osLocale = require('os-locale') - self.locale(osLocale.sync({ spawn: false })) - } catch (err) { - // if we explode looking up locale just noop - // we'll keep using the default language 'en'. - } - } - - function runCommand (command, yargs, argv) { - setPlaceholderKeys(argv) - yargs.getCommandHandlers()[command](yargs.reset(), argv) - } - - function setPlaceholderKeys (argv) { - Object.keys(options.key).forEach(function (key) { - // don't set placeholder keys for dot - // notation options 'foo.bar'. - if (~key.indexOf('.')) return - if (typeof argv[key] === 'undefined') argv[key] = undefined - }) - } - - sigletonify(self) - return self -} - -// rebase an absolute path to a relative one with respect to a base directory -// exported for tests -exports.rebase = rebase -function rebase (base, dir) { - return path.relative(base, dir) -} - -/* Hack an instance of Argv with process.argv into Argv - so people can do - require('yargs')(['--beeble=1','-z','zizzle']).argv - to parse a list of args and - require('yargs').argv - to get a parsed version of process.argv. -*/ -function sigletonify (inst) { - Object.keys(inst).forEach(function (key) { - if (key === 'argv') { - Argv.__defineGetter__(key, inst.__lookupGetter__(key)) - } else { - Argv[key] = typeof inst[key] === 'function' ? inst[key].bind(inst) : inst[key] - } - }) -} diff --git a/node_modules/yargs/lib/completion.js b/node_modules/yargs/lib/completion.js deleted file mode 100644 index 576012f..0000000 --- a/node_modules/yargs/lib/completion.js +++ /dev/null @@ -1,91 +0,0 @@ -var fs = require('fs') -var path = require('path') - -// add bash completions to your -// yargs-powered applications. -module.exports = function (yargs, usage) { - var self = { - completionKey: 'get-yargs-completions' - } - - // get a list of completion commands. - self.getCompletion = function (done) { - var completions = [] - var current = process.argv[process.argv.length - 1] - var previous = process.argv.slice(process.argv.indexOf('--' + self.completionKey) + 1) - var argv = yargs.parse(previous) - - // a custom completion function can be provided - // to completion(). - if (completionFunction) { - if (completionFunction.length < 3) { - var result = completionFunction(current, argv) - - // promise based completion function. - if (typeof result.then === 'function') { - return result.then(function (list) { - process.nextTick(function () { done(list) }) - }).catch(function (err) { - process.nextTick(function () { throw err }) - }) - } - - // synchronous completion function. - return done(result) - } else { - // asynchronous completion function - return completionFunction(current, argv, function (completions) { - done(completions) - }) - } - } - - var handlers = yargs.getCommandHandlers() - for (var i = 0, ii = previous.length; i < ii; ++i) { - if (handlers[previous[i]]) { - return handlers[previous[i]](yargs.reset()) - } - } - - if (!current.match(/^-/)) { - usage.getCommands().forEach(function (command) { - if (previous.indexOf(command[0]) === -1) { - completions.push(command[0]) - } - }) - } - - if (current.match(/^-/)) { - Object.keys(yargs.getOptions().key).forEach(function (key) { - completions.push('--' + key) - }) - } - - done(completions) - } - - // generate the completion script to add to your .bashrc. - self.generateCompletionScript = function ($0) { - var script = fs.readFileSync( - path.resolve(__dirname, '../completion.sh.hbs'), - 'utf-8' - ) - var name = path.basename($0) - - // add ./to applications not yet installed as bin. - if ($0.match(/\.js$/)) $0 = './' + $0 - - script = script.replace(/{{app_name}}/g, name) - return script.replace(/{{app_path}}/g, $0) - } - - // register a function to perform your own custom - // completions., this function can be either - // synchrnous or asynchronous. - var completionFunction = null - self.registerFunction = function (fn) { - completionFunction = fn - } - - return self -} diff --git a/node_modules/yargs/lib/parser.js b/node_modules/yargs/lib/parser.js deleted file mode 100644 index 235f7ed..0000000 --- a/node_modules/yargs/lib/parser.js +++ /dev/null @@ -1,499 +0,0 @@ -// fancy-pants parsing of argv, originally forked -// from minimist: https://www.npmjs.com/package/minimist -var camelCase = require('camelcase') -var path = require('path') - -function increment (orig) { - return orig !== undefined ? orig + 1 : 0 -} - -module.exports = function (args, opts, y18n) { - if (!opts) opts = {} - - var __ = y18n.__ - var error = null - var flags = { arrays: {}, bools: {}, strings: {}, counts: {}, normalize: {}, configs: {}, defaulted: {} } - - ;[].concat(opts['array']).filter(Boolean).forEach(function (key) { - flags.arrays[key] = true - }) - - ;[].concat(opts['boolean']).filter(Boolean).forEach(function (key) { - flags.bools[key] = true - }) - - ;[].concat(opts.string).filter(Boolean).forEach(function (key) { - flags.strings[key] = true - }) - - ;[].concat(opts.count).filter(Boolean).forEach(function (key) { - flags.counts[key] = true - }) - - ;[].concat(opts.normalize).filter(Boolean).forEach(function (key) { - flags.normalize[key] = true - }) - - ;[].concat(opts.config).filter(Boolean).forEach(function (key) { - flags.configs[key] = true - }) - - var aliases = {} - var newAliases = {} - - extendAliases(opts.key) - extendAliases(opts.alias) - - var defaults = opts['default'] || {} - Object.keys(defaults).forEach(function (key) { - if (/-/.test(key) && !opts.alias[key]) { - aliases[key] = aliases[key] || [] - } - (aliases[key] || []).forEach(function (alias) { - defaults[alias] = defaults[key] - }) - }) - - var argv = { _: [] } - - Object.keys(flags.bools).forEach(function (key) { - setArg(key, !(key in defaults) ? false : defaults[key]) - setDefaulted(key) - }) - - var notFlags = [] - if (args.indexOf('--') !== -1) { - notFlags = args.slice(args.indexOf('--') + 1) - args = args.slice(0, args.indexOf('--')) - } - - for (var i = 0; i < args.length; i++) { - var arg = args[i] - var broken - var key - var letters - var m - var next - var value - - // -- seperated by = - if (arg.match(/^--.+=/)) { - // Using [\s\S] instead of . because js doesn't support the - // 'dotall' regex modifier. See: - // http://stackoverflow.com/a/1068308/13216 - m = arg.match(/^--([^=]+)=([\s\S]*)$/) - - // nargs format = '--f=monkey washing cat' - if (checkAllAliases(m[1], opts.narg)) { - args.splice(i + 1, m[1], m[2]) - i = eatNargs(i, m[1], args) - // arrays format = '--f=a b c' - } else if (checkAllAliases(m[1], flags.arrays) && args.length > i + 1) { - args.splice(i + 1, m[1], m[2]) - i = eatArray(i, m[1], args) - } else { - setArg(m[1], m[2]) - } - } else if (arg.match(/^--no-.+/)) { - key = arg.match(/^--no-(.+)/)[1] - setArg(key, false) - - // -- seperated by space. - } else if (arg.match(/^--.+/)) { - key = arg.match(/^--(.+)/)[1] - - // nargs format = '--foo a b c' - if (checkAllAliases(key, opts.narg)) { - i = eatNargs(i, key, args) - // array format = '--foo a b c' - } else if (checkAllAliases(key, flags.arrays) && args.length > i + 1) { - i = eatArray(i, key, args) - } else { - next = args[i + 1] - - if (next !== undefined && !next.match(/^-/) && - !checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts)) { - setArg(key, next) - i++ - } else if (/^(true|false)$/.test(next)) { - setArg(key, next) - i++ - } else { - setArg(key, defaultForType(guessType(key, flags))) - } - } - - // dot-notation flag seperated by '='. - } else if (arg.match(/^-.\..+=/)) { - m = arg.match(/^-([^=]+)=([\s\S]*)$/) - setArg(m[1], m[2]) - - // dot-notation flag seperated by space. - } else if (arg.match(/^-.\..+/)) { - next = args[i + 1] - key = arg.match(/^-(.\..+)/)[1] - - if (next !== undefined && !next.match(/^-/) && - !checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts)) { - setArg(key, next) - i++ - } else { - setArg(key, defaultForType(guessType(key, flags))) - } - } else if (arg.match(/^-[^-]+/)) { - letters = arg.slice(1, -1).split('') - broken = false - - for (var j = 0; j < letters.length; j++) { - next = arg.slice(j + 2) - - if (letters[j + 1] && letters[j + 1] === '=') { - value = arg.slice(j + 3) - key = letters[j] - - // nargs format = '-f=monkey washing cat' - if (checkAllAliases(letters[j], opts.narg)) { - args.splice(i + 1, 0, value) - i = eatNargs(i, key, args) - // array format = '-f=a b c' - } else if (checkAllAliases(key, flags.arrays) && args.length > i + 1) { - args.splice(i + 1, 0, value) - i = eatArray(i, key, args) - } else { - setArg(key, value) - } - - broken = true - break - } - - if (next === '-') { - setArg(letters[j], next) - continue - } - - if (/[A-Za-z]/.test(letters[j]) && - /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { - setArg(letters[j], next) - broken = true - break - } - - if (letters[j + 1] && letters[j + 1].match(/\W/)) { - setArg(letters[j], arg.slice(j + 2)) - broken = true - break - } else { - setArg(letters[j], defaultForType(guessType(letters[j], flags))) - } - } - - key = arg.slice(-1)[0] - - if (!broken && key !== '-') { - // nargs format = '-f a b c' - if (checkAllAliases(key, opts.narg)) { - i = eatNargs(i, key, args) - // array format = '-f a b c' - } else if (checkAllAliases(key, flags.arrays) && args.length > i + 1) { - i = eatArray(i, key, args) - } else { - if (args[i + 1] && !/^(-|--)[^-]/.test(args[i + 1]) && - !checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts)) { - setArg(key, args[i + 1]) - i++ - } else if (args[i + 1] && /true|false/.test(args[i + 1])) { - setArg(key, args[i + 1]) - i++ - } else { - setArg(key, defaultForType(guessType(key, flags))) - } - } - } - } else { - argv._.push( - flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) - ) - } - } - - // order of precedence: - // 1. command line arg - // 2. value from config file - // 3. value from env var - // 4. configured default value - applyEnvVars(opts, argv, true) // special case: check env vars that point to config file - setConfig(argv) - applyEnvVars(opts, argv, false) - applyDefaultsAndAliases(argv, aliases, defaults) - - Object.keys(flags.counts).forEach(function (key) { - setArg(key, defaults[key]) - }) - - notFlags.forEach(function (key) { - argv._.push(key) - }) - - // how many arguments should we consume, based - // on the nargs option? - function eatNargs (i, key, args) { - var toEat = checkAllAliases(key, opts.narg) - - if (args.length - (i + 1) < toEat) error = Error(__('Not enough arguments following: %s', key)) - - for (var ii = i + 1; ii < (toEat + i + 1); ii++) { - setArg(key, args[ii]) - } - - return (i + toEat) - } - - // if an option is an array, eat all non-hyphenated arguments - // following it... YUM! - // e.g., --foo apple banana cat becomes ["apple", "banana", "cat"] - function eatArray (i, key, args) { - for (var ii = i + 1; ii < args.length; ii++) { - if (/^-/.test(args[ii])) break - i = ii - setArg(key, args[ii]) - } - - return i - } - - function setArg (key, val) { - unsetDefaulted(key) - - // handle parsing boolean arguments --foo=true --bar false. - if (checkAllAliases(key, flags.bools) || checkAllAliases(key, flags.counts)) { - if (typeof val === 'string') val = val === 'true' - } - - if (/-/.test(key) && !(aliases[key] && aliases[key].length)) { - var c = camelCase(key) - aliases[key] = [c] - newAliases[c] = true - } - - var value = !checkAllAliases(key, flags.strings) && isNumber(val) ? Number(val) : val - - if (checkAllAliases(key, flags.counts)) { - value = increment - } - - var splitKey = key.split('.') - setKey(argv, splitKey, value) - - // alias references an inner-value within - // a dot-notation object. see #279. - if (~key.indexOf('.') && aliases[key]) { - aliases[key].forEach(function (x) { - x = x.split('.') - setKey(argv, x, value) - }) - } - - ;(aliases[splitKey[0]] || []).forEach(function (x) { - x = x.split('.') - - // handle populating dot notation for both - // the key and its aliases. - if (splitKey.length > 1) { - var a = [].concat(splitKey) - a.shift() // nuke the old key. - x = x.concat(a) - } - - setKey(argv, x, value) - }) - - var keys = [key].concat(aliases[key] || []) - for (var i = 0, l = keys.length; i < l; i++) { - if (flags.normalize[keys[i]]) { - keys.forEach(function (key) { - argv.__defineSetter__(key, function (v) { - val = path.normalize(v) - }) - - argv.__defineGetter__(key, function () { - return typeof val === 'string' ? path.normalize(val) : val - }) - }) - break - } - } - } - - // set args from config.json file, this should be - // applied last so that defaults can be applied. - function setConfig (argv) { - var configLookup = {} - - // expand defaults/aliases, in-case any happen to reference - // the config.json file. - applyDefaultsAndAliases(configLookup, aliases, defaults) - - Object.keys(flags.configs).forEach(function (configKey) { - var configPath = argv[configKey] || configLookup[configKey] - if (configPath) { - try { - var config = require(path.resolve(process.cwd(), configPath)) - - Object.keys(config).forEach(function (key) { - // setting arguments via CLI takes precedence over - // values within the config file. - if (argv[key] === undefined || (flags.defaulted[key])) { - delete argv[key] - setArg(key, config[key]) - } - }) - } catch (ex) { - if (argv[configKey]) error = Error(__('Invalid JSON config file: %s', configPath)) - } - } - }) - } - - function applyEnvVars (opts, argv, configOnly) { - if (typeof opts.envPrefix === 'undefined') return - - var prefix = typeof opts.envPrefix === 'string' ? opts.envPrefix : '' - Object.keys(process.env).forEach(function (envVar) { - if (prefix === '' || envVar.lastIndexOf(prefix, 0) === 0) { - var key = camelCase(envVar.substring(prefix.length)) - if (((configOnly && flags.configs[key]) || !configOnly) && (!(key in argv) || flags.defaulted[key])) { - setArg(key, process.env[envVar]) - } - } - }) - } - - function applyDefaultsAndAliases (obj, aliases, defaults) { - Object.keys(defaults).forEach(function (key) { - if (!hasKey(obj, key.split('.'))) { - setKey(obj, key.split('.'), defaults[key]) - - ;(aliases[key] || []).forEach(function (x) { - if (hasKey(obj, x.split('.'))) return - setKey(obj, x.split('.'), defaults[key]) - }) - } - }) - } - - function hasKey (obj, keys) { - var o = obj - keys.slice(0, -1).forEach(function (key) { - o = (o[key] || {}) - }) - - var key = keys[keys.length - 1] - - if (typeof o !== 'object') return false - else return key in o - } - - function setKey (obj, keys, value) { - var o = obj - keys.slice(0, -1).forEach(function (key) { - if (o[key] === undefined) o[key] = {} - o = o[key] - }) - - var key = keys[keys.length - 1] - if (value === increment) { - o[key] = increment(o[key]) - } else if (o[key] === undefined && checkAllAliases(key, flags.arrays)) { - o[key] = Array.isArray(value) ? value : [value] - } else if (o[key] === undefined || typeof o[key] === 'boolean') { - o[key] = value - } else if (Array.isArray(o[key])) { - o[key].push(value) - } else { - o[key] = [ o[key], value ] - } - } - - // extend the aliases list with inferred aliases. - function extendAliases (obj) { - Object.keys(obj || {}).forEach(function (key) { - aliases[key] = [].concat(opts.alias[key] || []) - // For "--option-name", also set argv.optionName - aliases[key].concat(key).forEach(function (x) { - if (/-/.test(x)) { - var c = camelCase(x) - aliases[key].push(c) - newAliases[c] = true - } - }) - aliases[key].forEach(function (x) { - aliases[x] = [key].concat(aliases[key].filter(function (y) { - return x !== y - })) - }) - }) - } - - // check if a flag is set for any of a key's aliases. - function checkAllAliases (key, flag) { - var isSet = false - var toCheck = [].concat(aliases[key] || [], key) - - toCheck.forEach(function (key) { - if (flag[key]) isSet = flag[key] - }) - - return isSet - } - - function setDefaulted (key) { - [].concat(aliases[key] || [], key).forEach(function (k) { - flags.defaulted[k] = true - }) - } - - function unsetDefaulted (key) { - [].concat(aliases[key] || [], key).forEach(function (k) { - delete flags.defaulted[k] - }) - } - - // return a default value, given the type of a flag., - // e.g., key of type 'string' will default to '', rather than 'true'. - function defaultForType (type) { - var def = { - boolean: true, - string: '', - array: [] - } - - return def[type] - } - - // given a flag, enforce a default type. - function guessType (key, flags) { - var type = 'boolean' - - if (flags.strings && flags.strings[key]) type = 'string' - else if (flags.arrays && flags.arrays[key]) type = 'array' - - return type - } - - function isNumber (x) { - if (typeof x === 'number') return true - if (/^0x[0-9a-f]+$/i.test(x)) return true - return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x) - } - - return { - argv: argv, - aliases: aliases, - error: error, - newAliases: newAliases - } -} diff --git a/node_modules/yargs/lib/usage.js b/node_modules/yargs/lib/usage.js deleted file mode 100644 index b1b59bc..0000000 --- a/node_modules/yargs/lib/usage.js +++ /dev/null @@ -1,383 +0,0 @@ -// this file handles outputting usage instructions, -// failures, etc. keeps logging in one place. -var cliui = require('cliui') -var decamelize = require('decamelize') -var stringWidth = require('string-width') -var wsize = require('window-size') - -module.exports = function (yargs, y18n) { - var __ = y18n.__ - var self = {} - - // methods for ouputting/building failure message. - var fails = [] - self.failFn = function (f) { - fails.push(f) - } - - var failMessage = null - var showHelpOnFail = true - self.showHelpOnFail = function (enabled, message) { - if (typeof enabled === 'string') { - message = enabled - enabled = true - } else if (typeof enabled === 'undefined') { - enabled = true - } - failMessage = message - showHelpOnFail = enabled - return self - } - - var failureOutput = false - self.fail = function (msg) { - if (fails.length) { - fails.forEach(function (f) { - f(msg) - }) - } else { - // don't output failure message more than once - if (!failureOutput) { - failureOutput = true - if (showHelpOnFail) yargs.showHelp('error') - if (msg) console.error(msg) - if (failMessage) { - if (msg) console.error('') - console.error(failMessage) - } - } - if (yargs.getExitProcess()) { - process.exit(1) - } else { - throw new Error(msg) - } - } - } - - // methods for ouputting/building help (usage) message. - var usage - self.usage = function (msg) { - usage = msg - } - - var examples = [] - self.example = function (cmd, description) { - examples.push([cmd, description || '']) - } - - var commands = [] - self.command = function (cmd, description) { - commands.push([cmd, description || '']) - } - self.getCommands = function () { - return commands - } - - var descriptions = {} - self.describe = function (key, desc) { - if (typeof key === 'object') { - Object.keys(key).forEach(function (k) { - self.describe(k, key[k]) - }) - } else { - descriptions[key] = desc - } - } - self.getDescriptions = function () { - return descriptions - } - - var epilog - self.epilog = function (msg) { - epilog = msg - } - - var wrap = windowWidth() - self.wrap = function (cols) { - wrap = cols - } - - var deferY18nLookupPrefix = '__yargsString__:' - self.deferY18nLookup = function (str) { - return deferY18nLookupPrefix + str - } - - var defaultGroup = 'Options:' - self.help = function () { - normalizeAliases() - - var demanded = yargs.getDemanded() - var groups = yargs.getGroups() - var options = yargs.getOptions() - var keys = Object.keys( - Object.keys(descriptions) - .concat(Object.keys(demanded)) - .concat(Object.keys(options.default)) - .reduce(function (acc, key) { - if (key !== '_') acc[key] = true - return acc - }, {}) - ) - var ui = cliui({ - width: wrap, - wrap: !!wrap - }) - - // the usage string. - if (usage) { - var u = usage.replace(/\$0/g, yargs.$0) - ui.div(u + '\n') - } - - // your application's commands, i.e., non-option - // arguments populated in '_'. - if (commands.length) { - ui.div(__('Commands:')) - - commands.forEach(function (command) { - ui.div( - {text: command[0], padding: [0, 2, 0, 2], width: maxWidth(commands) + 4}, - {text: command[1]} - ) - }) - - ui.div() - } - - // perform some cleanup on the keys array, making it - // only include top-level keys not their aliases. - var aliasKeys = (Object.keys(options.alias) || []) - .concat(Object.keys(yargs.parsed.newAliases) || []) - - keys = keys.filter(function (key) { - return !yargs.parsed.newAliases[key] && aliasKeys.every(function (alias) { - return (options.alias[alias] || []).indexOf(key) === -1 - }) - }) - - // populate 'Options:' group with any keys that have not - // explicitly had a group set. - if (!groups[defaultGroup]) groups[defaultGroup] = [] - addUngroupedKeys(keys, options.alias, groups) - - // display 'Options:' table along with any custom tables: - Object.keys(groups).forEach(function (groupName) { - if (!groups[groupName].length) return - - ui.div(__(groupName)) - - // if we've grouped the key 'f', but 'f' aliases 'foobar', - // normalizedKeys should contain only 'foobar'. - var normalizedKeys = groups[groupName].map(function (key) { - if (~aliasKeys.indexOf(key)) return key - for (var i = 0, aliasKey; (aliasKey = aliasKeys[i]) !== undefined; i++) { - if (~(options.alias[aliasKey] || []).indexOf(key)) return aliasKey - } - return key - }) - - // actually generate the switches string --foo, -f, --bar. - var switches = normalizedKeys.reduce(function (acc, key) { - acc[key] = [ key ].concat(options.alias[key] || []) - .map(function (sw) { - return (sw.length > 1 ? '--' : '-') + sw - }) - .join(', ') - - return acc - }, {}) - - normalizedKeys.forEach(function (key) { - var kswitch = switches[key] - var desc = descriptions[key] || '' - var type = null - - if (~desc.lastIndexOf(deferY18nLookupPrefix)) desc = __(desc.substring(deferY18nLookupPrefix.length)) - - if (~options.boolean.indexOf(key)) type = '[' + __('boolean') + ']' - if (~options.count.indexOf(key)) type = '[' + __('count') + ']' - if (~options.string.indexOf(key)) type = '[' + __('string') + ']' - if (~options.normalize.indexOf(key)) type = '[' + __('string') + ']' - if (~options.array.indexOf(key)) type = '[' + __('array') + ']' - - var extra = [ - type, - demanded[key] ? '[' + __('required') + ']' : null, - options.choices && options.choices[key] ? '[' + __('choices:') + ' ' + - self.stringifiedValues(options.choices[key]) + ']' : null, - defaultString(options.default[key], options.defaultDescription[key]) - ].filter(Boolean).join(' ') - - ui.span( - {text: kswitch, padding: [0, 2, 0, 2], width: maxWidth(switches) + 4}, - desc - ) - - if (extra) ui.div({text: extra, padding: [0, 0, 0, 2], align: 'right'}) - else ui.div() - }) - - ui.div() - }) - - // describe some common use-cases for your application. - if (examples.length) { - ui.div(__('Examples:')) - - examples.forEach(function (example) { - example[0] = example[0].replace(/\$0/g, yargs.$0) - }) - - examples.forEach(function (example) { - ui.div( - {text: example[0], padding: [0, 2, 0, 2], width: maxWidth(examples) + 4}, - example[1] - ) - }) - - ui.div() - } - - // the usage string. - if (epilog) { - var e = epilog.replace(/\$0/g, yargs.$0) - ui.div(e + '\n') - } - - return ui.toString() - } - - // return the maximum width of a string - // in the left-hand column of a table. - function maxWidth (table) { - var width = 0 - - // table might be of the form [leftColumn], - // or {key: leftColumn}} - if (!Array.isArray(table)) { - table = Object.keys(table).map(function (key) { - return [table[key]] - }) - } - - table.forEach(function (v) { - width = Math.max(stringWidth(v[0]), width) - }) - - // if we've enabled 'wrap' we should limit - // the max-width of the left-column. - if (wrap) width = Math.min(width, parseInt(wrap * 0.5, 10)) - - return width - } - - // make sure any options set for aliases, - // are copied to the keys being aliased. - function normalizeAliases () { - var demanded = yargs.getDemanded() - var options = yargs.getOptions() - - ;(Object.keys(options.alias) || []).forEach(function (key) { - options.alias[key].forEach(function (alias) { - // copy descriptions. - if (descriptions[alias]) self.describe(key, descriptions[alias]) - // copy demanded. - if (demanded[alias]) yargs.demand(key, demanded[alias].msg) - // type messages. - if (~options.boolean.indexOf(alias)) yargs.boolean(key) - if (~options.count.indexOf(alias)) yargs.count(key) - if (~options.string.indexOf(alias)) yargs.string(key) - if (~options.normalize.indexOf(alias)) yargs.normalize(key) - if (~options.array.indexOf(alias)) yargs.array(key) - }) - }) - } - - // given a set of keys, place any keys that are - // ungrouped under the 'Options:' grouping. - function addUngroupedKeys (keys, aliases, groups) { - var groupedKeys = [] - var toCheck = null - Object.keys(groups).forEach(function (group) { - groupedKeys = groupedKeys.concat(groups[group]) - }) - - keys.forEach(function (key) { - toCheck = [key].concat(aliases[key]) - if (!toCheck.some(function (k) { - return groupedKeys.indexOf(k) !== -1 - })) { - groups[defaultGroup].push(key) - } - }) - return groupedKeys - } - - self.showHelp = function (level) { - level = level || 'error' - console[level](self.help()) - } - - self.functionDescription = function (fn) { - var description = fn.name ? decamelize(fn.name, '-') : __('generated-value') - return ['(', description, ')'].join('') - } - - self.stringifiedValues = function (values, separator) { - var string = '' - var sep = separator || ', ' - var array = [].concat(values) - - if (!values || !array.length) return string - - array.forEach(function (value) { - if (string.length) string += sep - string += JSON.stringify(value) - }) - - return string - } - - // format the default-value-string displayed in - // the right-hand column. - function defaultString (value, defaultDescription) { - var string = '[' + __('default:') + ' ' - - if (value === undefined && !defaultDescription) return null - - if (defaultDescription) { - string += defaultDescription - } else { - switch (typeof value) { - case 'string': - string += JSON.stringify(value) - break - case 'object': - string += JSON.stringify(value) - break - default: - string += value - } - } - - return string + ']' - } - - // guess the width of the console window, max-width 80. - function windowWidth () { - return wsize.width ? Math.min(80, wsize.width) : null - } - - // logic for displaying application version. - var version = null - self.version = function (ver, opt, msg) { - version = ver - } - - self.showVersion = function () { - if (typeof version === 'function') console.log(version()) - else console.log(version) - } - - return self -} diff --git a/node_modules/yargs/lib/validation.js b/node_modules/yargs/lib/validation.js deleted file mode 100644 index 514bbff..0000000 --- a/node_modules/yargs/lib/validation.js +++ /dev/null @@ -1,249 +0,0 @@ -// validation-type-stuff, missing params, -// bad implications, custom checks. -module.exports = function (yargs, usage, y18n) { - var __ = y18n.__ - var __n = y18n.__n - var self = {} - - // validate appropriate # of non-option - // arguments were provided, i.e., '_'. - self.nonOptionCount = function (argv) { - var demanded = yargs.getDemanded() - var _s = argv._.length - - if (demanded._ && (_s < demanded._.count || _s > demanded._.max)) { - if (demanded._.msg !== undefined) { - usage.fail(demanded._.msg) - } else if (_s < demanded._.count) { - usage.fail( - __('Not enough non-option arguments: got %s, need at least %s', argv._.length, demanded._.count) - ) - } else { - usage.fail( - __('Too many non-option arguments: got %s, maximum of %s', argv._.length, demanded._.max) - ) - } - } - } - - // make sure that any args that require an - // value (--foo=bar), have a value. - self.missingArgumentValue = function (argv) { - var defaultValues = [true, false, ''] - var options = yargs.getOptions() - - if (options.requiresArg.length > 0) { - var missingRequiredArgs = [] - - options.requiresArg.forEach(function (key) { - var value = argv[key] - - // if a value is explicitly requested, - // flag argument as missing if it does not - // look like foo=bar was entered. - if (~defaultValues.indexOf(value) || - (Array.isArray(value) && !value.length)) { - missingRequiredArgs.push(key) - } - }) - - if (missingRequiredArgs.length > 0) { - usage.fail(__n( - 'Missing argument value: %s', - 'Missing argument values: %s', - missingRequiredArgs.length, - missingRequiredArgs.join(', ') - )) - } - } - } - - // make sure all the required arguments are present. - self.requiredArguments = function (argv) { - var demanded = yargs.getDemanded() - var missing = null - - Object.keys(demanded).forEach(function (key) { - if (!argv.hasOwnProperty(key)) { - missing = missing || {} - missing[key] = demanded[key] - } - }) - - if (missing) { - var customMsgs = [] - Object.keys(missing).forEach(function (key) { - var msg = missing[key].msg - if (msg && customMsgs.indexOf(msg) < 0) { - customMsgs.push(msg) - } - }) - - var customMsg = customMsgs.length ? '\n' + customMsgs.join('\n') : '' - - usage.fail(__n( - 'Missing required argument: %s', - 'Missing required arguments: %s', - Object.keys(missing).length, - Object.keys(missing).join(', ') + customMsg - )) - } - } - - // check for unknown arguments (strict-mode). - self.unknownArguments = function (argv, aliases) { - var aliasLookup = {} - var descriptions = usage.getDescriptions() - var demanded = yargs.getDemanded() - var unknown = [] - - Object.keys(aliases).forEach(function (key) { - aliases[key].forEach(function (alias) { - aliasLookup[alias] = key - }) - }) - - Object.keys(argv).forEach(function (key) { - if (key !== '$0' && key !== '_' && - !descriptions.hasOwnProperty(key) && - !demanded.hasOwnProperty(key) && - !aliasLookup.hasOwnProperty(key)) { - unknown.push(key) - } - }) - - if (unknown.length > 0) { - usage.fail(__n( - 'Unknown argument: %s', - 'Unknown arguments: %s', - unknown.length, - unknown.join(', ') - )) - } - } - - // validate arguments limited to enumerated choices - self.limitedChoices = function (argv) { - var options = yargs.getOptions() - var invalid = {} - - if (!Object.keys(options.choices).length) return - - Object.keys(argv).forEach(function (key) { - if (key !== '$0' && key !== '_' && - options.choices.hasOwnProperty(key)) { - [].concat(argv[key]).forEach(function (value) { - // TODO case-insensitive configurability - if (options.choices[key].indexOf(value) === -1) { - invalid[key] = (invalid[key] || []).concat(value) - } - }) - } - }) - - var invalidKeys = Object.keys(invalid) - - if (!invalidKeys.length) return - - var msg = __('Invalid values:') - invalidKeys.forEach(function (key) { - msg += '\n ' + __( - 'Argument: %s, Given: %s, Choices: %s', - key, - usage.stringifiedValues(invalid[key]), - usage.stringifiedValues(options.choices[key]) - ) - }) - usage.fail(msg) - } - - // custom checks, added using the `check` option on yargs. - var checks = [] - self.check = function (f) { - checks.push(f) - } - - self.customChecks = function (argv, aliases) { - checks.forEach(function (f) { - try { - var result = f(argv, aliases) - if (!result) { - usage.fail(__('Argument check failed: %s', f.toString())) - } else if (typeof result === 'string') { - usage.fail(result) - } - } catch (err) { - usage.fail(err.message ? err.message : err) - } - }) - } - - // check implications, argument foo implies => argument bar. - var implied = {} - self.implies = function (key, value) { - if (typeof key === 'object') { - Object.keys(key).forEach(function (k) { - self.implies(k, key[k]) - }) - } else { - implied[key] = value - } - } - self.getImplied = function () { - return implied - } - - self.implications = function (argv) { - var implyFail = [] - - Object.keys(implied).forEach(function (key) { - var num - var origKey = key - var value = implied[key] - - // convert string '1' to number 1 - num = Number(key) - key = isNaN(num) ? key : num - - if (typeof key === 'number') { - // check length of argv._ - key = argv._.length >= key - } else if (key.match(/^--no-.+/)) { - // check if key doesn't exist - key = key.match(/^--no-(.+)/)[1] - key = !argv[key] - } else { - // check if key exists - key = argv[key] - } - - num = Number(value) - value = isNaN(num) ? value : num - - if (typeof value === 'number') { - value = argv._.length >= value - } else if (value.match(/^--no-.+/)) { - value = value.match(/^--no-(.+)/)[1] - value = !argv[value] - } else { - value = argv[value] - } - - if (key && !value) { - implyFail.push(origKey) - } - }) - - if (implyFail.length) { - var msg = __('Implications failed:') + '\n' - - implyFail.forEach(function (key) { - msg += (' ' + key + ' -> ' + implied[key]) - }) - - usage.fail(msg) - } - } - - return self -} diff --git a/node_modules/yargs/locales/de.json b/node_modules/yargs/locales/de.json deleted file mode 100644 index 00b3907..0000000 --- a/node_modules/yargs/locales/de.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "Commands:": "Kommandos:", - "Options:": "Optionen:", - "Examples:": "Beispiele:", - "boolean": "boolean", - "count": "Zähler", - "string": "string", - "array": "array", - "required": "erforderlich", - "default:": "Standard:", - "choices:": "Möglichkeiten:", - "generated-value": "Generierter-Wert", - "Not enough non-option arguments: got %s, need at least %s": "Nicht genügend Argumente ohne Optionen: %s vorhanden, mindestens %s benötigt", - "Too many non-option arguments: got %s, maximum of %s": "Zu viele Argumente ohne Optionen: %s vorhanden, maximal %s erlaubt", - "Missing argument value: %s": { - "one": "Fehlender Argumentwert: %s", - "other": "Fehlende Argumentwerte: %s" - }, - "Missing required argument: %s": { - "one": "Fehlendes Argument: %s", - "other": "Fehlende Argumente: %s" - }, - "Unknown argument: %s": { - "one": "Unbekanntes Argument: %s", - "other": "Unbekannte Argumente: %s" - }, - "Invalid values:": "Unzulässige Werte:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gegeben: %s, Möglichkeiten: %s", - "Argument check failed: %s": "Argumente-Check fehlgeschlagen: %s", - "Implications failed:": "Implikationen fehlgeschlagen:", - "Not enough arguments following: %s": "Nicht genügend Argumente nach: %s", - "Invalid JSON config file: %s": "Fehlerhafte JSON-Config Datei: %s", - "Path to JSON config file": "Pfad zur JSON-Config Datei", - "Show help": "Hilfe anzeigen", - "Show version number": "Version anzeigen" -} diff --git a/node_modules/yargs/locales/en.json b/node_modules/yargs/locales/en.json deleted file mode 100644 index ce19199..0000000 --- a/node_modules/yargs/locales/en.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "Commands:": "Commands:", - "Options:": "Options:", - "Examples:": "Examples:", - "boolean": "boolean", - "count": "count", - "string": "string", - "array": "array", - "required": "required", - "default:": "default:", - "choices:": "choices:", - "generated-value": "generated-value", - "Not enough non-option arguments: got %s, need at least %s": "Not enough non-option arguments: got %s, need at least %s", - "Too many non-option arguments: got %s, maximum of %s": "Too many non-option arguments: got %s, maximum of %s", - "Missing argument value: %s": { - "one": "Missing argument value: %s", - "other": "Missing argument values: %s" - }, - "Missing required argument: %s": { - "one": "Missing required argument: %s", - "other": "Missing required arguments: %s" - }, - "Unknown argument: %s": { - "one": "Unknown argument: %s", - "other": "Unknown arguments: %s" - }, - "Invalid values:": "Invalid values:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Given: %s, Choices: %s", - "Argument check failed: %s": "Argument check failed: %s", - "Implications failed:": "Implications failed:", - "Not enough arguments following: %s": "Not enough arguments following: %s", - "Invalid JSON config file: %s": "Invalid JSON config file: %s", - "Path to JSON config file": "Path to JSON config file", - "Show help": "Show help", - "Show version number": "Show version number" -} diff --git a/node_modules/yargs/locales/es.json b/node_modules/yargs/locales/es.json deleted file mode 100644 index c4f1917..0000000 --- a/node_modules/yargs/locales/es.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "Commands:": "Comandos:", - "Options:": "Opciones:", - "Examples:": "Ejemplos:", - "boolean": "boolean", - "count": "cuenta", - "string": "cadena de caracteres", - "array": "tabla", - "required": "requisito", - "default:": "defecto:", - "choices:": "selección:", - "generated-value": "valor-generado", - "Not enough non-option arguments: got %s, need at least %s": "Hacen falta argumentos no-opcionales: Número recibido %s, necesita por lo menos %s", - "Too many non-option arguments: got %s, maximum of %s": "Demasiados argumentos no-opcionales: Número recibido %s, máximo es %s", - "Missing argument value: %s": { - "one": "Falta argumento: %s", - "other": "Faltan argumentos: %s" - }, - "Missing required argument: %s": { - "one": "Falta argumento requerido: %s", - "other": "Faltan argumentos requeridos: %s" - }, - "Unknown argument: %s": { - "one": "Argumento desconocido: %s", - "other": "Argumentos desconocidos: %s" - }, - "Invalid values:": "Valores inválidos:", - "Argument: %s, Given: %s, Choices: %s": "Argumento: %s, Recibido: %s, Selección: %s", - "Argument check failed: %s": "Verificación de argumento ha fracasado: %s", - "Implications failed:": "Implicaciones fracasadas:", - "Not enough arguments following: %s": "No hay suficientes argumentos después de: %s", - "Invalid JSON config file: %s": "Archivo de configuración JSON inválido: %s", - "Path to JSON config file": "Ruta al archivo de configuración JSON", - "Show help": "Muestra ayuda", - "Show version number": "Muestra número de versión" -} diff --git a/node_modules/yargs/locales/fr.json b/node_modules/yargs/locales/fr.json deleted file mode 100644 index 49d068b..0000000 --- a/node_modules/yargs/locales/fr.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "Commands:": "Commandes:", - "Options:": "Options:", - "Examples:": "Exemples:", - "boolean": "booléen", - "count": "comptage", - "string": "chaine de caractère", - "array": "tableau", - "required": "requis", - "default:": "défaut:", - "choices:": "choix:", - "generated-value": "valeur générée", - "Not enough non-option arguments: got %s, need at least %s": "Pas assez d'arguments non-option: reçu %s, besoin d'au moins %s", - "Too many non-option arguments: got %s, maximum of %s": "Trop d'arguments non-option: reçu %s, maximum %s", - "Missing argument value: %s": { - "one": "Argument manquant: %s", - "other": "Arguments manquants: %s" - }, - "Missing required argument: %s": { - "one": "Argument requis manquant: %s", - "other": "Arguments requis manquants: %s" - }, - "Unknown argument: %s": { - "one": "Argument inconnu: %s", - "other": "Arguments inconnus: %s" - }, - "Invalid values:": "Valeurs invalides:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Donné: %s, Choix: %s", - "Argument check failed: %s": "Echec de la vérification de l'argument: %s", - "Implications failed:": "Implications échouées:", - "Not enough arguments following: %s": "Pas assez d'arguments suivant: %s", - "Invalid JSON config file: %s": "Fichier de configuration JSON invalide: %s", - "Path to JSON config file": "Chemin du fichier de configuration JSON", - "Show help": "Affiche de l'aide", - "Show version number": "Affiche le numéro de version" -} diff --git a/node_modules/yargs/locales/id.json b/node_modules/yargs/locales/id.json deleted file mode 100644 index 7cb7e56..0000000 --- a/node_modules/yargs/locales/id.json +++ /dev/null @@ -1,37 +0,0 @@ - -{ - "Commands:": "Perintah:", - "Options:": "Pilihan:", - "Examples:": "Contoh:", - "boolean": "boolean", - "count": "jumlah", - "string": "string", - "array": "larik", - "required": "diperlukan", - "default:": "bawaan:", - "choices:": "pilihan:", - "generated-value": "nilai-yang-dihasilkan", - "Not enough non-option arguments: got %s, need at least %s": "Argumen wajib kurang: hanya %s, minimal %s", - "Too many non-option arguments: got %s, maximum of %s": "Terlalu banyak argumen wajib: ada %s, maksimal %s", - "Missing argument value: %s": { - "one": "Kurang argumen: %s", - "other": "Kurang argumen: %s" - }, - "Missing required argument: %s": { - "one": "Kurang argumen wajib: %s", - "other": "Kurang argumen wajib: %s" - }, - "Unknown argument: %s": { - "one": "Argumen tak diketahui: %s", - "other": "Argumen tak diketahui: %s" - }, - "Invalid values:": "Nilai-nilai tidak valid:", - "Argument: %s, Given: %s, Choices: %s": "Argumen: %s, Diberikan: %s, Pilihan: %s", - "Argument check failed: %s": "Pemeriksaan argument gagal: %s", - "Implications failed:": "Implikasi gagal:", - "Not enough arguments following: %s": "Kurang argumen untuk: %s", - "Invalid JSON config file: %s": "Berkas konfigurasi JSON tidak valid: %s", - "Path to JSON config file": "Alamat berkas konfigurasi JSON", - "Show help": "Lihat bantuan", - "Show version number": "Lihat nomor versi" -} diff --git a/node_modules/yargs/locales/ja.json b/node_modules/yargs/locales/ja.json deleted file mode 100644 index 21b8e52..0000000 --- a/node_modules/yargs/locales/ja.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "Commands:": "コマンド:", - "Options:": "オプション:", - "Examples:": "例:", - "boolean": "真偽", - "count": "カウント", - "string": "文字列", - "array": "配列", - "required": "必須", - "default:": "デフォルト:", - "choices:": "選択してください:", - "generated-value": "生成された値", - "Not enough non-option arguments: got %s, need at least %s": "オプションではない引数が %s 個では不足しています。少なくとも %s 個の引数が必要です:", - "Too many non-option arguments: got %s, maximum of %s": "オプションではない引数が %s 個では多すぎます。最大で %s 個までです:", - "Missing argument value: %s": { - "one": "引数が見つかりません: %s", - "other": "引数が見つかりません: %s" - }, - "Missing required argument: %s": { - "one": "必須の引数が見つかりません: %s", - "other": "必須の引数が見つかりません: %s" - }, - "Unknown argument: %s": { - "one": "未知の引数です: %s", - "other": "未知の引数です: %s" - }, - "Invalid values:": "不正な値です:", - "Argument: %s, Given: %s, Choices: %s": "引数は %s です。指定できるのは %s つです。選択してください: %s", - "Argument check failed: %s": "引数のチェックに失敗しました: %s", - "Implications failed:": "オプションの組み合わせで不正が生じました:", - "Not enough arguments following: %s": "次の引数が不足しています。: %s", - "Invalid JSON config file: %s": "JSONの設定ファイルが不正です: %s", - "Path to JSON config file": "JSONの設定ファイルまでのpath", - "Show help": "ヘルプを表示", - "Show version number": "バージョンを表示" -} diff --git a/node_modules/yargs/locales/ko.json b/node_modules/yargs/locales/ko.json deleted file mode 100644 index a16971a..0000000 --- a/node_modules/yargs/locales/ko.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "Commands:": "명령:", - "Options:": "옵션:", - "Examples:": "예시:", - "boolean": "여부", - "count": "개수", - "string": "문자열", - "array": "배열", - "required": "필수", - "default:": "기본:", - "choices:": "선택:", - "generated-value": "생성된 값", - "Not enough non-option arguments: got %s, need at least %s": "옵션이 아닌 인자가 충분치 않습니다: %s개를 받았지만, 적어도 %s개는 필요합니다", - "Too many non-option arguments: got %s, maximum of %s": "옵션이 아닌 인자가 너무 많습니다: %s개를 받았지만, %s개 이하여야 합니다", - "Missing argument value: %s": { - "one": "인자값을 받지 못했습니다: %s", - "other": "인자값들을 받지 못했습니다: %s" - }, - "Missing required argument: %s": { - "one": "필수 인자를 받지 못했습니다: %s", - "other": "필수 인자들을 받지 못했습니다: %s" - }, - "Unknown argument: %s": { - "one": "알 수 없는 인자입니다: %s", - "other": "알 수 없는 인자들입니다: %s" - }, - "Invalid values:": "잘못된 값입니다:", - "Argument: %s, Given: %s, Choices: %s": "인자: %s, 입력받은 값: %s, 선택지: %s", - "Argument check failed: %s": "유효하지 않은 인자입니다: %s", - "Implications failed:": "옵션의 조합이 잘못되었습니다:", - "Not enough arguments following: %s": "인자가 충분하게 주어지지 않았습니다: %s", - "Invalid JSON config file: %s": "유효하지 않은 JSON 설정파일입니다: %s", - "Path to JSON config file": "JSON 설정파일 경로", - "Show help": "도움말을 보여줍니다", - "Show version number": "버전 넘버를 보여줍니다" -} diff --git a/node_modules/yargs/locales/nb.json b/node_modules/yargs/locales/nb.json deleted file mode 100644 index 65fa6ae..0000000 --- a/node_modules/yargs/locales/nb.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "Commands:": "Kommandoer:", - "Options:": "Alternativer:", - "Examples:": "Eksempler:", - "boolean": "boolsk", - "count": "antall", - "string": "streng", - "array": "matrise", - "required": "obligatorisk", - "default:": "standard:", - "choices:": "valg:", - "generated-value": "generert-verdi", - "Not enough non-option arguments: got %s, need at least %s": "Ikke nok ikke-alternativ argumenter: fikk %s, trenger minst %s", - "Too many non-option arguments: got %s, maximum of %s": "For mange ikke-alternativ argumenter: fikk %s, maksimum %s", - "Missing argument value: %s": { - "one": "Mangler argument verdi: %s", - "other": "Mangler argument verdier: %s" - }, - "Missing required argument: %s": { - "one": "Mangler obligatorisk argument: %s", - "other": "Mangler obligatoriske argumenter: %s" - }, - "Unknown argument: %s": { - "one": "Ukjent argument: %s", - "other": "Ukjente argumenter: %s" - }, - "Invalid values:": "Ugyldige verdier:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gitt: %s, Valg: %s", - "Argument check failed: %s": "Argument sjekk mislyktes: %s", - "Implications failed:": "Konsekvensene mislyktes:", - "Not enough arguments following: %s": "Ikke nok følgende argumenter: %s", - "Invalid JSON config file: %s": "Ugyldig JSON konfigurasjonsfil: %s", - "Path to JSON config file": "Bane til JSON konfigurasjonsfil", - "Show help": "Vis hjelp", - "Show version number": "Vis versjonsnummer" -} diff --git a/node_modules/yargs/locales/pirate.json b/node_modules/yargs/locales/pirate.json deleted file mode 100644 index 1f4e19e..0000000 --- a/node_modules/yargs/locales/pirate.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "Commands:": "Choose yer command:", - "Options:": "Options for me hearties!", - "Examples:": "Ex. marks the spot:", - "required": "requi-yar-ed", - "Missing required argument: %s": { - "one": "Ye be havin' to set the followin' argument land lubber: %s", - "other": "Ye be havin' to set the followin' arguments land lubber: %s" - }, - "Show help": "Parlay this here code of conduct", - "Show version number": "'Tis the version ye be askin' fer" -} diff --git a/node_modules/yargs/locales/pl.json b/node_modules/yargs/locales/pl.json deleted file mode 100644 index 7d4c5be..0000000 --- a/node_modules/yargs/locales/pl.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "Commands:": "Polecenia:", - "Options:": "Opcje:", - "Examples:": "Przykłady:", - "boolean": "boolean", - "count": "ilość", - "string": "ciąg znaków", - "array": "tablica", - "required": "wymagany", - "default:": "domyślny:", - "choices:": "dostępne:", - "generated-value": "wygenerowana-wartość", - "Not enough non-option arguments: got %s, need at least %s": "Niewystarczająca ilość argumentów: otrzymano %s, wymagane co najmniej %s", - "Too many non-option arguments: got %s, maximum of %s": "Zbyt duża ilość argumentów: otrzymano %s, wymagane co najwyżej %s", - "Missing argument value: %s": { - "one": "Brak wartości dla argumentu: %s", - "other": "Brak wartości dla argumentów: %s" - }, - "Missing required argument: %s": { - "one": "Brak wymaganego argumentu: %s", - "other": "Brak wymaganych argumentów: %s" - }, - "Unknown argument: %s": { - "one": "Nieznany argument: %s", - "other": "Nieznane argumenty: %s" - }, - "Invalid values:": "Nieprawidłowe wartości:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Otrzymano: %s, Dostępne: %s", - "Argument check failed: %s": "Weryfikacja argumentów nie powiodła się: %s", - "Implications failed:": "Założenia nie zostały spełnione:", - "Not enough arguments following: %s": "Niewystarczająca ilość argumentów następujących po: %s", - "Invalid JSON config file: %s": "Nieprawidłowy plik konfiguracyjny JSON: %s", - "Path to JSON config file": "Ścieżka do pliku konfiguracyjnego JSON", - "Show help": "Pokaż pomoc", - "Show version number": "Pokaż numer wersji" -} diff --git a/node_modules/yargs/locales/pt.json b/node_modules/yargs/locales/pt.json deleted file mode 100644 index 6abbcd4..0000000 --- a/node_modules/yargs/locales/pt.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "Commands:": "Comandos:", - "Options:": "Opções:", - "Examples:": "Exemplos:", - "boolean": "boolean", - "count": "contagem", - "string": "cadeia de caracteres", - "array": "arranjo", - "required": "requerido", - "default:": "padrão:", - "choices:": "escolhas:", - "generated-value": "valor-gerado", - "Not enough non-option arguments: got %s, need at least %s": "Argumentos insuficientes não opcionais: Argumento %s, necessário pelo menos %s", - "Too many non-option arguments: got %s, maximum of %s": "Excesso de argumentos não opcionais: recebido %s, máximo de %s", - "Missing argument value: %s": { - "one": "Falta valor de argumento: %s", - "other": "Falta valores de argumento: %s" - }, - "Missing required argument: %s": { - "one": "Falta argumento obrigatório: %s", - "other": "Faltando argumentos obrigatórios: %s" - }, - "Unknown argument: %s": { - "one": "Argumento desconhecido: %s", - "other": "Argumentos desconhecidos: %s" - }, - "Invalid values:": "Valores inválidos:", - "Argument: %s, Given: %s, Choices: %s": "Argumento: %s, Dado: %s, Escolhas: %s", - "Argument check failed: %s": "Verificação de argumento falhou: %s", - "Implications failed:": "Implicações falharam:", - "Not enough arguments following: %s": "Insuficientes argumentos a seguir: %s", - "Invalid JSON config file: %s": "Arquivo de configuração em JSON esta inválido: %s", - "Path to JSON config file": "Caminho para o arquivo de configuração em JSON", - "Show help": "Mostra ajuda", - "Show version number": "Mostra número de versão" -} diff --git a/node_modules/yargs/locales/pt_BR.json b/node_modules/yargs/locales/pt_BR.json deleted file mode 100644 index eb7544e..0000000 --- a/node_modules/yargs/locales/pt_BR.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "Commands:": "Comandos:", - "Options:": "Opções:", - "Examples:": "Exemplos:", - "boolean": "boolean", - "count": "contagem", - "string": "string", - "array": "array", - "required": "obrigatório", - "default:": "padrão:", - "choices:": "opções:", - "generated-value": "valor-gerado", - "Not enough non-option arguments: got %s, need at least %s": "Argumentos insuficientes: Argumento %s, necessário pelo menos %s", - "Too many non-option arguments: got %s, maximum of %s": "Excesso de argumentos: recebido %s, máximo de %s", - "Missing argument value: %s": { - "one": "Falta valor de argumento: %s", - "other": "Falta valores de argumento: %s" - }, - "Missing required argument: %s": { - "one": "Falta argumento obrigatório: %s", - "other": "Faltando argumentos obrigatórios: %s" - }, - "Unknown argument: %s": { - "one": "Argumento desconhecido: %s", - "other": "Argumentos desconhecidos: %s" - }, - "Invalid values:": "Valores inválidos:", - "Argument: %s, Given: %s, Choices: %s": "Argumento: %s, Dado: %s, Opções: %s", - "Argument check failed: %s": "Verificação de argumento falhou: %s", - "Implications failed:": "Implicações falharam:", - "Not enough arguments following: %s": "Argumentos insuficientes a seguir: %s", - "Invalid JSON config file: %s": "Arquivo JSON de configuração inválido: %s", - "Path to JSON config file": "Caminho para o arquivo JSON de configuração", - "Show help": "Exibe ajuda", - "Show version number": "Exibe a versão" -} diff --git a/node_modules/yargs/locales/tr.json b/node_modules/yargs/locales/tr.json deleted file mode 100644 index cef09d2..0000000 --- a/node_modules/yargs/locales/tr.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "Commands:": "Komutlar:", - "Options:": "Seçenekler:", - "Examples:": "Örnekler:", - "boolean": "boolean", - "count": "sayı", - "string": "string", - "array": "array", - "required": "zorunlu", - "default:": "varsayılan:", - "choices:": "seçimler:", - "generated-value": "oluşturulan-değer", - "Not enough non-option arguments: got %s, need at least %s": "Seçenek dışı argümanlar yetersiz: %s bulundu, %s gerekli", - "Too many non-option arguments: got %s, maximum of %s": "Seçenek dışı argümanlar gereğinden fazla: %s bulundu, azami %s", - "Missing argument value: %s": { - "one": "Eksik argüman değeri: %s", - "other": "Eksik argüman değerleri: %s" - }, - "Missing required argument: %s": { - "one": "Eksik zorunlu argüman: %s", - "other": "Eksik zorunlu argümanlar: %s" - }, - "Unknown argument: %s": { - "one": "Bilinmeyen argüman: %s", - "other": "Bilinmeyen argümanlar: %s" - }, - "Invalid values:": "Geçersiz değerler:", - "Argument: %s, Given: %s, Choices: %s": "Argüman: %s, Verilen: %s, Seçimler: %s", - "Argument check failed: %s": "Argüman kontrolü başarısız oldu: %s", - "Implications failed:": "Sonuçlar başarısız oldu:", - "Not enough arguments following: %s": "%s için yeterli argüman bulunamadı", - "Invalid JSON config file: %s": "Geçersiz JSON yapılandırma dosyası: %s", - "Path to JSON config file": "JSON yapılandırma dosya konumu", - "Show help": "Yardım detaylarını göster", - "Show version number": "Versiyon detaylarını göster" -} diff --git a/node_modules/yargs/locales/zh.json b/node_modules/yargs/locales/zh.json deleted file mode 100644 index 7b01d71..0000000 --- a/node_modules/yargs/locales/zh.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "Commands:": "命令:", - "Options:": "选项:", - "Examples:": "示例:", - "boolean": "boolean", - "count": "count", - "string": "string", - "array": "array", - "required": "required", - "default:": "默认值:", - "choices:": "可选值:", - "generated-value": "生成的值", - "Not enough non-option arguments: got %s, need at least %s": "缺少 non-option 参数:传入了 %s 个, 至少需要 %s 个", - "Too many non-option arguments: got %s, maximum of %s": "non-option 参数过多:传入了 %s 个, 最大允许 %s 个", - "Missing argument value: %s": { - "one": "没有给此选项指定值:%s", - "other": "没有给这些选项指定值:%s" - }, - "Missing required argument: %s": { - "one": "缺少必须的选项:%s", - "other": "缺少这些必须的选项:%s" - }, - "Unknown argument: %s": { - "one": "无法识别的选项:%s", - "other": "无法识别这些选项:%s" - }, - "Invalid values:": "无效的选项值:", - "Argument: %s, Given: %s, Choices: %s": "选项名称: %s, 传入的值: %s, 可选的值:%s", - "Argument check failed: %s": "选项值验证失败:%s", - "Implications failed:": "缺少依赖的选项:", - "Not enough arguments following: %s": "没有提供足够的值给此选项:%s", - "Invalid JSON config file: %s": "无效的 JSON 配置文件:%s", - "Path to JSON config file": "JSON 配置文件的路径", - "Show help": "显示帮助信息", - "Show version number": "显示版本号" -} diff --git a/node_modules/yargs/package.json b/node_modules/yargs/package.json deleted file mode 100644 index 9a505b4..0000000 --- a/node_modules/yargs/package.json +++ /dev/null @@ -1,165 +0,0 @@ -{ - "_args": [ - [ - "yargs@^3.8.0", - "/Users/gautier/git/bitbucket/spaycific-quizz/node_modules/sass-graph" - ] - ], - "_from": "yargs@>=3.8.0 <4.0.0", - "_id": "yargs@3.31.0", - "_inCache": true, - "_installable": true, - "_location": "/yargs", - "_nodeVersion": "3.2.0", - "_npmUser": { - "email": "ben@npmjs.com", - "name": "bcoe" - }, - "_npmVersion": "2.14.13", - "_phantomChildren": {}, - "_requested": { - "name": "yargs", - "raw": "yargs@^3.8.0", - "rawSpec": "^3.8.0", - "scope": null, - "spec": ">=3.8.0 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/sass-graph" - ], - "_resolved": "https://registry.npmjs.org/yargs/-/yargs-3.31.0.tgz", - "_shasum": "9f28210aaa0a796570e99505644b968f5e41a1bc", - "_shrinkwrap": null, - "_spec": "yargs@^3.8.0", - "_where": "/Users/gautier/git/bitbucket/spaycific-quizz/node_modules/sass-graph", - "author": { - "email": "Alex.Ford@CodeTunnel.com", - "name": "Alex Ford", - "url": "http://CodeTunnel.com" - }, - "bugs": { - "url": "https://github.com/bcoe/yargs/issues" - }, - "contributors": [ - { - "name": "Benjamin Coe", - "email": "ben@npmjs.com", - "url": "https://github.com/bcoe" - }, - { - "name": "Andrew Goode", - "url": "https://github.com/nexdrew" - }, - { - "name": "Chris Needham", - "email": "chris@chrisneedham.com", - "url": "http://chrisneedham.com" - }, - { - "name": "James Nylen", - "email": "jnylen@gmail.com", - "url": "https://github.com/nylen" - }, - { - "name": "Benjamin Horsleben", - "url": "https://github.com/fizker" - }, - { - "name": "Lin Clark", - "url": "https://github.com/linclark" - }, - { - "name": "Tim Schaub", - "url": "https://github.com/tschaub" - } - ], - "dependencies": { - "camelcase": "^2.0.1", - "cliui": "^3.0.3", - "decamelize": "^1.1.1", - "os-locale": "^1.4.0", - "string-width": "^1.0.1", - "window-size": "^0.1.4", - "y18n": "^3.2.0" - }, - "description": "Light-weight option parsing with an argv hash. No optstrings attached.", - "devDependencies": { - "chai": "^3.4.1", - "chalk": "^1.1.1", - "coveralls": "^2.11.4", - "es6-promise": "^3.0.2", - "hashish": "0.0.4", - "mocha": "^2.3.4", - "nyc": "^4.0.1", - "standard": "^5.4.1", - "which": "^1.1.2", - "win-spawn": "^2.0.0" - }, - "directories": {}, - "dist": { - "shasum": "9f28210aaa0a796570e99505644b968f5e41a1bc", - "tarball": "http://registry.npmjs.org/yargs/-/yargs-3.31.0.tgz" - }, - "engine": { - "node": ">=0.4" - }, - "files": [ - "LICENSE", - "completion.sh.hbs", - "index.js", - "lib", - "locales" - ], - "gitHead": "e37a70c7ca67742e05ec6420772793c9d5e6bc82", - "homepage": "https://github.com/bcoe/yargs#readme", - "keywords": [ - "args", - "argument", - "cli", - "command", - "option", - "parser", - "parsing" - ], - "license": "MIT", - "main": "./index.js", - "maintainers": [ - { - "name": "bcoe", - "email": "ben@npmjs.com" - }, - { - "name": "chevex", - "email": "alex.ford@codetunnel.com" - }, - { - "name": "nexdrew", - "email": "andrew@npmjs.com" - }, - { - "name": "nylen", - "email": "jnylen@gmail.com" - } - ], - "name": "yargs", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/bcoe/yargs.git" - }, - "scripts": { - "coverage": "nyc report --reporter=text-lcov | coveralls", - "test": "standard && nyc ./node_modules/.bin/_mocha --timeout=4000 --check-leaks" - }, - "standard": { - "globals": [ - "it" - ], - "ignore": [ - "**/example/**" - ] - }, - "version": "3.31.0" -} diff --git a/package.json b/package.json deleted file mode 100644 index 0d8f361..0000000 --- a/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "Angular-Kickstart", - "version": "1.0.0", - "description": "Angular Kickstart", - "main": "Index.html", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "https://github.com/JeremyMorgan/Angular-Kickstart.git" - }, - "keywords": [ - "git" - ], - "author": "Jeremy Morgan", - "license": "ISC", - "bugs": { - "url": "https://github.com/JeremyMorgan/Angular-Kickstart/issues" - }, - "homepage": "https://github.com/JeremyMorgan/Angular-Kickstart", - "devDependencies": { - "gulp": "^3.9.0", - "gulp-bower": "0.0.11", - "gulp-notify": "^2.2.0", - "gulp-ruby-sass": "^2.0.6", - "gulp-sass": "^2.1.1" - } -}