127 lines
21 KiB
JSON
127 lines
21 KiB
JSON
|
{
|
||
|
"_args": [
|
||
|
[
|
||
|
{
|
||
|
"raw": "dashdash@^1.12.0",
|
||
|
"scope": null,
|
||
|
"escapedName": "dashdash",
|
||
|
"name": "dashdash",
|
||
|
"rawSpec": "^1.12.0",
|
||
|
"spec": ">=1.12.0 <2.0.0",
|
||
|
"type": "range"
|
||
|
},
|
||
|
"/Volumes/2009-SSD/GT2/GT2-iOS/node_modules/sshpk"
|
||
|
]
|
||
|
],
|
||
|
"_from": "dashdash@>=1.12.0 <2.0.0",
|
||
|
"_id": "dashdash@1.14.1",
|
||
|
"_inCache": true,
|
||
|
"_location": "/dashdash",
|
||
|
"_nodeVersion": "4.6.1",
|
||
|
"_npmOperationalInternal": {
|
||
|
"host": "packages-12-west.internal.npmjs.com",
|
||
|
"tmp": "tmp/dashdash-1.14.1.tgz_1479854020349_0.731718891998753"
|
||
|
},
|
||
|
"_npmUser": {
|
||
|
"name": "trentm",
|
||
|
"email": "trentm@gmail.com"
|
||
|
},
|
||
|
"_npmVersion": "2.15.9",
|
||
|
"_phantomChildren": {},
|
||
|
"_requested": {
|
||
|
"raw": "dashdash@^1.12.0",
|
||
|
"scope": null,
|
||
|
"escapedName": "dashdash",
|
||
|
"name": "dashdash",
|
||
|
"rawSpec": "^1.12.0",
|
||
|
"spec": ">=1.12.0 <2.0.0",
|
||
|
"type": "range"
|
||
|
},
|
||
|
"_requiredBy": [
|
||
|
"/sshpk"
|
||
|
],
|
||
|
"_resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
|
||
|
"_shasum": "853cfa0f7cbe2fed5de20326b8dd581035f6e2f0",
|
||
|
"_shrinkwrap": null,
|
||
|
"_spec": "dashdash@^1.12.0",
|
||
|
"_where": "/Volumes/2009-SSD/GT2/GT2-iOS/node_modules/sshpk",
|
||
|
"author": {
|
||
|
"name": "Trent Mick",
|
||
|
"email": "trentm@gmail.com",
|
||
|
"url": "http://trentm.com"
|
||
|
},
|
||
|
"bugs": {
|
||
|
"url": "https://github.com/trentm/node-dashdash/issues"
|
||
|
},
|
||
|
"contributors": [
|
||
|
{
|
||
|
"name": "Trent Mick",
|
||
|
"email": "trentm@gmail.com",
|
||
|
"url": "http://trentm.com"
|
||
|
},
|
||
|
{
|
||
|
"name": "Isaac Schlueter",
|
||
|
"url": "https://github.com/isaacs"
|
||
|
},
|
||
|
{
|
||
|
"name": "Joshua M. Clulow",
|
||
|
"url": "https://github.com/jclulow"
|
||
|
},
|
||
|
{
|
||
|
"name": "Patrick Mooney",
|
||
|
"url": "https://github.com/pfmooney"
|
||
|
},
|
||
|
{
|
||
|
"name": "Dave Pacheco",
|
||
|
"url": "https://github.com/davepacheco"
|
||
|
}
|
||
|
],
|
||
|
"dependencies": {
|
||
|
"assert-plus": "^1.0.0"
|
||
|
},
|
||
|
"description": "A light, featureful and explicit option parsing library.",
|
||
|
"devDependencies": {
|
||
|
"nodeunit": "0.9.x"
|
||
|
},
|
||
|
"directories": {},
|
||
|
"dist": {
|
||
|
"shasum": "853cfa0f7cbe2fed5de20326b8dd581035f6e2f0",
|
||
|
"tarball": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz"
|
||
|
},
|
||
|
"engines": {
|
||
|
"node": ">=0.10"
|
||
|
},
|
||
|
"gitHead": "1dd7379640462a21ca6d92502803de830b4acfa2",
|
||
|
"homepage": "https://github.com/trentm/node-dashdash#readme",
|
||
|
"keywords": [
|
||
|
"option",
|
||
|
"parser",
|
||
|
"parsing",
|
||
|
"cli",
|
||
|
"command",
|
||
|
"args",
|
||
|
"bash",
|
||
|
"completion"
|
||
|
],
|
||
|
"license": "MIT",
|
||
|
"main": "./lib/dashdash.js",
|
||
|
"maintainers": [
|
||
|
{
|
||
|
"name": "trentm",
|
||
|
"email": "trentm@gmail.com"
|
||
|
}
|
||
|
],
|
||
|
"name": "dashdash",
|
||
|
"optionalDependencies": {},
|
||
|
"readme": "A light, featureful and explicit option parsing library for node.js.\n\n[Why another one? See below](#why). tl;dr: The others I've tried are one of\ntoo loosey goosey (not explicit), too big/too many deps, or ill specified.\nYMMV.\n\nFollow <a href=\"https://twitter.com/intent/user?screen_name=trentmick\" target=\"_blank\">@trentmick</a>\nfor updates to node-dashdash.\n\n# Install\n\n npm install dashdash\n\n\n# Usage\n\n```javascript\nvar dashdash = require('dashdash');\n\n// Specify the options. Minimally `name` (or `names`) and `type`\n// must be given for each.\nvar options = [\n {\n // `names` or a single `name`. First element is the `opts.KEY`.\n names: ['help', 'h'],\n // See \"Option specs\" below for types.\n type: 'bool',\n help: 'Print this help and exit.'\n }\n];\n\n// Shortcut form. As called it infers `process.argv`. See below for\n// the longer form to use methods like `.help()` on the Parser object.\nvar opts = dashdash.parse({options: options});\n\nconsole.log(\"opts:\", opts);\nconsole.log(\"args:\", opts._args);\n```\n\n\n# Longer Example\n\nA more realistic [starter script \"foo.js\"](./examples/foo.js) is as follows.\nThis also shows using `parser.help()` for formatted option help.\n\n```javascript\nvar dashdash = require('./lib/dashdash');\n\nvar options = [\n {\n name: 'version',\n type: 'bool',\n help: 'Print tool version and exit.'\n },\n {\n names: ['help', 'h'],\n type: 'bool',\n help: 'Print this help and exit.'\n },\n {\n names: ['verbose', 'v'],\n type: 'arrayOfBool',\n help: 'Verbose output. Use multiple times for more verbose.'\n },\n {\n names: ['file', 'f'],\n type: 'string',\n help: 'File to process',\n helpArg: 'FILE'\n }\n];\n\nvar parser = dashdash.createParser({options: options});\ntry {\n var opts = parser.parse(process.argv);\n} catch (e) {\n console.error('foo: error: %s', e.message);\n process.exit(1);\n}\n\nconsole.log(\"# opts:\", opts);\nconsole.log(\"# args:\", opts._args);\n\n// Use `parser.help()` for formatted options help.\nif (opts.help) {\n var help = parser.help({includeEnv: true}).trimRight();\n console.log('usage: node foo.js [OPTIONS]\\n'\n + 'options:\\n'\n + help);\n process.exit(0);\n}\n\n// ...\n```\n\n\nSome example output from this script (foo.js):\n\n```\n$ node foo.js -h\n# opts: { help: true,\n _order: [ { name: 'help', value: true, from: 'argv' } ],\n _args: [] }\n# args: []\nusage: node foo.js [OPTIONS]\noptions:\n --version Print tool version and exit.\n -h, --help Print this help and exit.\n -v, --verbose Verbose output. Use multiple times for more verbose.\n -f FILE, --file=FILE File to process\n\n$ node foo.js -v\n# opts: { verbose: [ true ],\n _order: [ { name: 'verbose', value: true, from: 'argv' } ],\n _args: [] }\n# args: []\n\n$ node foo.js --version arg1\n# opts: { version: true,\n _order: [ { name: 'version', value: true, from: 'argv' } ],\n _args: [ 'arg1' ] }\n# args: [ 'arg1' ]\n\n$ node foo.js -f bar.txt\n# opts: { file: 'bar.txt',\n _order: [ { name: 'file', value: 'bar.txt', from: 'argv' } ],\n _args: [] }\n# args: []\n\n$ node foo.js -vvv --file=blah\n# opts: { verbose: [ true, true, true ],\n file: 'blah',\n _order:\n [ { name: 'verbose', value: true, from: 'argv' },\n { name: 'verbose', value: true, from: 'argv' },\n { name: 'verbose', value: true, from: 'argv' },\n { name: 'file', value: 'blah', from: 'argv' } ],\n _args: [] }\n# args: []\n```\n\n\nSee the [\"examples\"](examples/) dir for a number of starter examples using\nsome of dashdash's features.\n\n\n# Environment variable integration\n\nIf you want to allow environment variables to specify options to your tool,\ndashdash makes this easy. We can change the 'verbose' option in the example\nabove to include an 'env' field:\n\n```javascript\n {\n names: ['verbose', 'v'],\n type
|
||
|
"readmeFilename": "README.md",
|
||
|
"repository": {
|
||
|
"type": "git",
|
||
|
"url": "git://github.com/trentm/node-dashdash.git"
|
||
|
},
|
||
|
"scripts": {
|
||
|
"test": "nodeunit test/*.test.js"
|
||
|
},
|
||
|
"version": "1.14.1"
|
||
|
}
|