{"name":"npm-run","version":"1.0.0","description":"Run locally-installed executables.","main":"index.js","bin":{"npm-run":"bin/npm-run.js"},"scripts":{"test":"faucet"},"author":{"name":"Tim Oxley"},"license":"MIT","devDependencies":{"bl":"^0.8.0","faucet":"0.0.1","tape":"^2.12.3"},"dependencies":{"commander":"^2.2.0","npm-path":"^1.0.0"},"_id":"npm-run@1.0.0","_shasum":"f1f3d059db1bb1495983f4d4c1fe233b7b4e3f4f","_from":".","_npmVersion":"1.4.7","_npmUser":{"name":"timoxley","email":"secoif@gmail.com"},"maintainers":[{"name":"timoxley","email":"secoif@gmail.com"}],"dist":{"shasum":"f1f3d059db1bb1495983f4d4c1fe233b7b4e3f4f","tarball":"http://registry-npm.ywwl.com/npm-run/download/npm-run-1.0.0.tgz","integrity":"sha512-m8kopZgsvzFSnYVvqYZH2YVl0JDxWHsCKUDF/lLUMiNsKgQZ6jj8ahsgx9XZUQViyVfaxcdErwN7StKP1Uif9Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDb4euMc8tqE6QSO604dYJPd+nd9GLflnE3ZwMYtBkHeQIhAIGK7QDj/wyA7J5HP45Vg2MENE/AQWGEg8zVVl88sWNR"}],"size":2769,"noattachment":false,"key":"/npm-run/-/npm-run-1.0.0.tgz"},"directories":{},"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":1398297110739,"_cnpm_publish_time":1398297110739,"dist-tags":{"latest":"5.0.1"}}