{"name":"npm-run","version":"4.0.1","description":"Run locally-installed executables.","main":"index.js","bin":{"npm-run":"bin/npm-run.js"},"scripts":{"test":"tape test/*.js"},"author":{"name":"Tim Oxley"},"license":"MIT","devDependencies":{"bl":"^1.1.2","tape":"^4.6.0"},"dependencies":{"minimist":"^1.2.0","npm-path":"^2.0.2","npm-which":"^3.0.0","serializerr":"^1.0.2","sync-exec":"^0.6.2"},"directories":{"test":"test"},"repository":{"type":"git","url":"git+https://github.com/timoxley/npm-run.git"},"keywords":["npm","path","executable","run"],"bugs":{"url":"https://github.com/timoxley/npm-run/issues"},"homepage":"https://github.com/timoxley/npm-run","engines":{"node":">=4.2.0"},"gitHead":"882ded358d156ae03d34d2f3428559b7478f477a","_id":"npm-run@4.0.1","_shasum":"c449ca671ef5dc47db5a4695d8bc950f4d33a8d8","_from":".","_npmVersion":"3.10.5","_nodeVersion":"6.2.2","_npmUser":{"name":"timoxley","email":"secoif@gmail.com"},"maintainers":[{"name":"timoxley","email":"secoif@gmail.com"}],"dist":{"shasum":"c449ca671ef5dc47db5a4695d8bc950f4d33a8d8","tarball":"http://registry-npm.ywwl.com/npm-run/download/npm-run-4.0.1.tgz","integrity":"sha512-+QfWe0ZetNw7IjxDbPfXUYTWQoZjXmaKN5BCGkJ5xlti7HXhbjYL6PwNQGrfkG7z/nONvF6wegIDqq/oAyrpUg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFB8dSZHv1TYRtAlzF0CJKy199oOnzuuDKkBPbJx2Mm5AiBAZLLytLa7n7Lgl0dTpV3KBu8K8Sp3YHSGOwzTqtR5Mw=="}],"size":4857,"noattachment":false,"key":"/npm-run/-/npm-run-4.0.1.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/npm-run-4.0.1.tgz_1469170648134_0.28237337130121887"},"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":1469170650850,"_cnpm_publish_time":1469170650850,"dist-tags":{"latest":"5.0.1"}}