{"name":"npm-run-path","version":"3.1.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":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["npm","run","path","package","bin","binary","binaries","script","cli","command-line","execute","executable"],"dependencies":{"path-key":"^3.0.0"},"devDependencies":{"ava":"^1.4.1","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"1f745c451448a8bbf2044211071793a1444edc31","bugs":{"url":"https://github.com/sindresorhus/npm-run-path/issues"},"homepage":"https://github.com/sindresorhus/npm-run-path#readme","_id":"npm-run-path@3.1.0","_nodeVersion":"8.15.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-Dbl4A/VfiVGLgQv29URL9xshU8XDY1GeLy+fsaZ1AA8JDSfjvr5P5+pzRbWqRSBxk6/DW7MIh8lTM/PaGnP2kg==","shasum":"7f91be317f6a466efed3c9f2980ad8a4ee8b0fa5","tarball":"http://registry-npm.ywwl.com/npm-run-path/download/npm-run-path-3.1.0.tgz","fileCount":5,"unpackedSize":6583,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcpvcoCRA9TVsSAnZWagAA150P/iIbvxbp73CDQ1XgmbAs\nkvNvUNhWqmHQ1wpfCde9qkIrCcrvYjn1p6tDXCL3HZXZQZATkB9KSOn5XlZd\nZmpfnHZvvoUu4hfVTQXIZjHoNvO2VvxOj+D+9Og/wzM6cJtAOmz/C3XBXR2B\nI8nWdzq1typyfJjVCYruvlVh6OuxX/Fx+9aGveNhSPXeCklDdqyOjgr9iR+W\nXsD48hHc7EfMr2N+vE5c0ErC/Y63segd3H+Q85RN3yVSFAWGlvjlUyL54t5S\nyPe7KBdmk8lprre4rVlaHlM7X1w5N5MmGZW7uYH3v/c6y0ZObXYZ+jBU/TRp\ncihsdaCnr2rtx3s8R8q21MVqUAWBxg9CdBrvTA5PRIH0V0+mlZGUk7bf7PIO\nD/n3rALpnchlPj8qmNgp1F5+CCPcHFQx+qrLEDH9FRDjrqOdHIgUDAsNIMd4\nlNsI/4p86ypVPq2w6h5J8IB9MNkLxYIj+Z5ClVv+toYoc9hB0go7rvYB6S8Z\nxSp+e9f24ZxlI+6fEpv7nzONq2R4TujY6ZQii+kFMnQ0FJGfe+TYhcyXW09W\n/VEZw757MV1BMfvItTCuMwEtpm6PN2XxVj0z5IPKiqG627NsFhEoe7GTLtyF\n2I2kBGlaNgxD/zWOGV5j2i0UpXph5G8SLDTFW6eBnNbIGzlPfH9RxbKfqhdd\nW2Gl\r\n=1jCu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDEelqXmZjicS1G1al/xLeoqsGLn6Qyg1Lo+euH8TNNqAiEA3Y7UXLG8slJPQnCVufupRHbStClW9S39gSu1s0Dwvv0="}],"size":2599,"noattachment":false,"key":"/npm-run-path/-/npm-run-path-3.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/npm-run-path_3.1.0_1554446119558_0.8857482387067892"},"_hasShrinkwrap":false,"readme":"# 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## Install\n\n```sh\nnpm install npm-run-path\n```\n\n## Usage\n\n```js\nimport childProcess from 'node:child_process';\nimport {npmRunPath, npmRunPathEnv} from '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: npmRunPathEnv()\n});\n```\n\n## API\n\n### npmRunPath(options?)\n\n`options`: [`Options`](#options)\\\n_Returns_: `string`\n\nReturns the augmented PATH string.\n\n### npmRunPathEnv(options?)\n\n`options`: [`Options`](#options)\\\n_Returns_: `object`\n\nReturns the augmented [`process.env`](https://nodejs.org/api/process.html#process_process_env) object.\n\n### options\n\nType: `object`\n\n#### cwd\n\nType: `string | URL`\\\nDefault: `process.cwd()`\n\nThe working directory.\n\n#### execPath\n\nType: `string | URL`\\\nDefault: [`process.execPath`](https://nodejs.org/api/process.html#processexecpath)\n\nThe path to the current Node.js executable.\n\nThis can be either an absolute path or a path relative to the [`cwd` option](#cwd).\n\n#### addExecPath\n\nType: `boolean`\\\nDefault: `true`\n\nWhether to push the current Node.js executable's directory ([`execPath`](#execpath) option) to the front of PATH.\n\n#### preferLocal\n\nType: `boolean`\\\nDefault: `true`\n\nWhether to push the locally installed binaries' directory to the front of PATH.\n\n#### path\n\nType: `string`\\\nDefault: [`PATH`](https://github.com/sindresorhus/path-key)\n\nThe PATH to be appended.\n\nSet it to an empty string to exclude the default PATH.\n\nOnly available with [`npmRunPath()`](#npmrunpathoptions), not [`npmRunPathEnv()`](#npmrunpathenvoptions).\n\n#### env\n\nType: `object`\\\nDefault: [`process.env`](https://nodejs.org/api/process.html#processenv)\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\nOnly available with [`npmRunPathEnv()`](#npmrunpathenvoptions), not [`npmRunPath()`](#npmrunpathoptions).\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","publish_time":1554446119707,"_cnpm_publish_time":1554446119707,"dist-tags":{"latest":"6.0.0"}}