{"name":"npm-run","version":"5.0.0","description":"Run executables for locally-installed packages without using ./node_modules/.bin","main":"index.js","bin":{"npm-run":"bin/npm-run.js"},"scripts":{"test":"tape test/*.js && npm run lint","lint":"standard"},"author":{"name":"Tim Oxley"},"license":"MIT","devDependencies":{"bl":"^1.2.2","standard":"^11.0.1","tape":"^4.9.0"},"dependencies":{"minimist":"^1.2.0","npm-path":"^2.0.4","npm-which":"^3.0.1","serializerr":"^1.0.3"},"directories":{"test":"test"},"repository":{"type":"git","url":"git+https://github.com/timoxley/npm-run.git"},"keywords":["npm","path","executable",".bin","run"],"bugs":{"url":"https://github.com/timoxley/npm-run/issues"},"homepage":"https://github.com/timoxley/npm-run","engines":{"node":">=4.2.0"},"gitHead":"6d85febd8aea00efd12e65f5ad7317af0e9947d4","_id":"npm-run@5.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"timoxley","email":"secoif@gmail.com"},"dist":{"integrity":"sha512-/x52i/DzUrly0EEIisVazHtfYJ44n/SHqM2efIq3VRc6a+u2zzaWApsmD1WCcLoOTEDLSINsJQ3NUHNdsr6ksQ==","shasum":"ec131a2abbc161676bf2c8fa50c81d4cbe3ed33d","tarball":"http://registry-npm.ywwl.com/npm-run/download/npm-run-5.0.0.tgz","fileCount":10,"unpackedSize":19426,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEmWsn5GHxpqQ2ej1QP6L2IsOZndh4yEuWAOhqJzsL6lAiEA1UmgWXBHrWujz6Bl2o1cSi251+4YMalDOQ4A7rEi5m8="}],"size":5086,"noattachment":false,"key":"/npm-run/-/npm-run-5.0.0.tgz"},"maintainers":[{"name":"timoxley","email":"secoif@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/npm-run_5.0.0_1523334901009_0.9314446672183618"},"_hasShrinkwrap":false,"readme":"# npm-run\n\n[![NPM](https://nodei.co/npm/npm-run.png?downloads=true&downloadRank=true)](https://nodei.co/npm-dl/npm-run/)\n[![NPM](https://nodei.co/npm-dl/npm-run.png?months=3&height=3&chrome)](https://nodei.co/npm/npm-run/)\n\n[![Build Status](https://travis-ci.org/timoxley/npm-run.svg?branch=master)](https://travis-ci.org/timoxley/npm-run)\n\n### Run executables in node_modules from the command-line\n\nUse `npm-run` to ensure you're using the same version of a package on the command-line and in package.json scripts.\n\nAny executable available to an npm lifecycle script is available to `npm-run`.\n\n## Usage\n\n```bash\n> npm install mocha # mocha installed in ./node_modules\n> npm-run mocha test/* # uses locally installed mocha executable \n```\n\n```bash\n> npm-run --help\nUsage: npm-run command [...args]\nOptions:\n  --version  Display version & exit.\n  --help     Display this help & exit.\n\nHint: to print augmented path use:\nnpm-run node -p process.env.PATH\n```\n\n## Installation\n\n```bash\n> npm install -g npm-run\n```\n\n## Programmatic API\n\nThe API of `npm-run` basically wraps core `child_process` methods (exec, spawn, etc) such that locally install package executables will be on the PATH when the command runs.\n\n## npmRun(command[, options], callback)\n\nAlias of npmRun.exec.\n\n## npmRun.exec(command[, options], callback)\n\nTakes same arguments as node's [exec](https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback).\n\n```js\nnpmRun.exec('mocha --debug-brk --sort', {cwd: __dirname + '/tests'}, function (err, stdout, stderr) {\n  // err Error or null if there was no error\n  // stdout Buffer|String\n  // stderr Buffer|String\n})\n```\n\n## npmRun.sync(command[, options])\n\nAlias of npmRun.execSync\n\n## npmRun.execSync(command[, options])\n\nTakes same arguments as node's [execSync](https://nodejs.org/api/child_process.html#child_process_child_process_execsync_command_options).\n\n```js\nvar stdout = npmRun.execSync(\n  'mocha --debug-brk --sort',\n  {cwd: __dirname + '/tests'}\n)\nstdout // command output as Buffer|String\n```\n\n## npmRun.spawnSync(command[, args][, options])\n\nTakes same arguments as node's [spawnSync](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options).\n\n```js\nvar child = npmRun.spawnSync(\n  'mocha',\n  '--debug-brk --sort'.split(' '),\n  {cwd: __dirname + '/tests'}\n)\nchild.stdout // stdout Buffer|String\nchild.stderr // stderr Buffer|String\nchild.status // exit code\n```\n\n## npmRun.spawn(command[, args][, options])\n\nTakes same arguments as node's [spawn](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options).\n\n```js\nvar child = npmRun.spawn(\n  'mocha',\n  '--debug-brk --sort'.split(' '),\n  {cwd: __dirname + '/tests'}\n)\nchild.stdout // stdout Stream\nchild.stderr // stderr Stream\nchild.on('exit', function (code) {\n  code // exit code\n})\n```\n\n## Why\n\nDue to npm's install algorithm `node_modules/.bin` is not guaranteed to contain your executable. `npm-run` uses the same mechanism npm uses to locate the correct executable.\n\n### See Also\n\n* [timoxley/npm-which](https://github.com/timoxley/npm-which)\n* [timoxley/npm-path](https://github.com/timoxley/npm-path)\n* [grncdr/npm-exec](https://github.com/grncdr/npm-exec)\n\n## License\n\nMIT\n","publish_time":1523334901078,"_cnpm_publish_time":1523334901078,"dist-tags":{"latest":"5.0.1"}}