{"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"keywords":["npm","run","path","package","bin","binary","binaries","script","cli","command-line","execute","executable"],"dist-tags":{"latest":"2.0.2"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"description":"Get your PATH prepended with locally installed binaries","readme":"# npm-run-path [![Build Status](https://travis-ci.org/sindresorhus/npm-run-path.svg?branch=master)](https://travis-ci.org/sindresorhus/npm-run-path)\n\n> Get your [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) prepended with locally installed binaries\n\nIn [npm run scripts](https://docs.npmjs.com/cli/run-script) you can execute locally installed binaries by name. This enables the same outside npm.\n\n\n## Install\n\n```\n$ npm install --save npm-run-path\n```\n\n\n## Usage\n\n```js\nconst childProcess = require('child_process');\nconst npmRunPath = require('npm-run-path');\n\nconsole.log(process.env.PATH);\n//=> '/usr/local/bin'\n\nconsole.log(npmRunPath());\n//=> '/Users/sindresorhus/dev/foo/node_modules/.bin:/Users/sindresorhus/dev/node_modules/.bin:/Users/sindresorhus/node_modules/.bin:/Users/node_modules/.bin:/node_modules/.bin:/usr/local/bin'\n\n// `foo` is a locally installed binary\nchildProcess.execFileSync('foo', {\n\tenv: npmRunPath.env()\n});\n```\n\n\n## API\n\n### npmRunPath([options])\n\n#### options\n\n##### cwd\n\nType: `string`<br>\nDefault: `process.cwd()`\n\nWorking directory.\n\n##### path\n\nType: `string`<br>\nDefault: [`PATH`](https://github.com/sindresorhus/path-key)\n\nPATH to be appended.<br>\nSet it to an empty string to exclude the default PATH.\n\n### npmRunPath.env([options])\n\n#### options\n\n##### cwd\n\nType: `string`<br>\nDefault: `process.cwd()`\n\nWorking directory.\n\n##### env\n\nType: `Object`\n\nAccepts an object of environment variables, like `process.env`, and modifies the PATH using the correct [PATH key](https://github.com/sindresorhus/path-key). Use this if you're modifying the PATH for use in the `child_process` options.\n\n\n## Related\n\n- [npm-run-path-cli](https://github.com/sindresorhus/npm-run-path-cli) - CLI for this module\n- [execa](https://github.com/sindresorhus/execa) - Execute a locally installed binary\n\n\n## License\n\nMIT © [Sindre Sorhus](https://sindresorhus.com)\n","repository":{"type":"git","url":"git+https://github.com/sindresorhus/npm-run-path.git"},"users":{"danielbayley":true,"aretecode":true},"bugs":{"url":"https://github.com/sindresorhus/npm-run-path/issues"},"license":"MIT","versions":{"1.0.0":{"name":"npm-run-path","version":"1.0.0","description":"Get your PATH prepended with locally installed binaries","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/npm-run-path"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["npm","run","path","package","bin","binary","binaries","script","cli","command-line","execute","executable"],"dependencies":{"path-key":"^1.0.0"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"8565fe56a35dd58bde38d20409339ba2e0200bd0","bugs":{"url":"https://github.com/sindresorhus/npm-run-path/issues"},"homepage":"https://github.com/sindresorhus/npm-run-path","_id":"npm-run-path@1.0.0","_shasum":"f5c32bf595fe81ae927daec52e82f8b000ac3c8f","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.2.4","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"f5c32bf595fe81ae927daec52e82f8b000ac3c8f","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/npm-run-path/-/npm-run-path-1.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{}},"2.0.0":{"name":"npm-run-path","version":"2.0.0","description":"Get your PATH prepended with locally installed binaries","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/npm-run-path.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["npm","run","path","package","bin","binary","binaries","script","cli","command-line","execute","executable"],"dependencies":{"path-key":"^2.0.0"},"devDependencies":{"ava":"*","xo":"*"},"xo":{"esnext":true},"gitHead":"3511ae423a6e89fe381aa602b92b36e2630740c1","bugs":{"url":"https://github.com/sindresorhus/npm-run-path/issues"},"homepage":"https://github.com/sindresorhus/npm-run-path#readme","_id":"npm-run-path@2.0.0","_shasum":"b860993b6c0d2a243f370d8d24dba198899648bf","_from":".","_npmVersion":"2.15.9","_nodeVersion":"4.5.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"b860993b6c0d2a243f370d8d24dba198899648bf","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/npm-run-path/-/npm-run-path-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/npm-run-path-2.0.0.tgz_1474785287361_0.8598830895498395"},"directories":{}},"2.0.1":{"name":"npm-run-path","version":"2.0.1","description":"Get your PATH prepended with locally installed binaries","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/npm-run-path.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["npm","run","path","package","bin","binary","binaries","script","cli","command-line","execute","executable"],"dependencies":{"path-key":"^2.0.0"},"devDependencies":{"ava":"*","xo":"*"},"xo":{"esnext":true},"gitHead":"3bce80f6128d30bd75e7fd7123d72b62c5e1f0e7","bugs":{"url":"https://github.com/sindresorhus/npm-run-path/issues"},"homepage":"https://github.com/sindresorhus/npm-run-path#readme","_id":"npm-run-path@2.0.1","_shasum":"0c89ba91d4b4c3e3f3f9579a9b733cc9ab429d90","_from":".","_npmVersion":"2.15.9","_nodeVersion":"4.5.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"0c89ba91d4b4c3e3f3f9579a9b733cc9ab429d90","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/npm-run-path/-/npm-run-path-2.0.1.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/npm-run-path-2.0.1.tgz_1475038953258_0.8133386990521103"},"directories":{}},"2.0.2":{"name":"npm-run-path","version":"2.0.2","description":"Get your PATH prepended with locally installed binaries","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/npm-run-path.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["npm","run","path","package","bin","binary","binaries","script","cli","command-line","execute","executable"],"dependencies":{"path-key":"^2.0.0"},"devDependencies":{"ava":"*","xo":"*"},"xo":{"esnext":true},"gitHead":"4d956312d5da324c4eff435af7d80797f04f09e1","bugs":{"url":"https://github.com/sindresorhus/npm-run-path/issues"},"homepage":"https://github.com/sindresorhus/npm-run-path#readme","_id":"npm-run-path@2.0.2","_shasum":"35a9232dfa35d7067b4cb2ddf2357b1871536c5f","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.6.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"35a9232dfa35d7067b4cb2ddf2357b1871536c5f","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/npm-run-path/-/npm-run-path-2.0.2.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/npm-run-path-2.0.2.tgz_1475136638037_0.6285470693837851"},"directories":{}}},"name":"npm-run-path","time":{"modified":"2017-03-31T11:29:21.970Z","created":"2015-12-28T18:54:14.293Z","1.0.0":"2015-12-28T18:54:14.293Z","2.0.0":"2016-09-25T06:34:49.794Z","2.0.1":"2016-09-28T05:02:34.870Z","2.0.2":"2016-09-29T08:10:39.751Z"},"readmeFilename":"readme.md","homepage":"https://github.com/sindresorhus/npm-run-path#readme"}