{"_id":"npm-path","_rev":"18-b79c3e571409f75ef671416a2e5bd49f","name":"npm-path","description":"Get a PATH with all executables available to npm scripts.","dist-tags":{"latest":"2.0.4"},"versions":{"1.0.0":{"name":"npm-path","version":"1.0.0","description":"Get a PATH with all executables available to npm scripts.","main":"index.js","bin":{"npm-path":"bin/npm-path"},"scripts":{"test":"faucet"},"author":{"name":"Tim Oxley"},"license":"MIT","devDependencies":{"faucet":"0.0.1","tape":"^2.12.3"},"dependencies":{"which":"^1.0.5"},"_id":"npm-path@1.0.0","dist":{"shasum":"3910f4a49eec072f3dad60eb4e27edda652acac8","tarball":"https://registry.npmjs.org/npm-path/-/npm-path-1.0.0.tgz","integrity":"sha512-xeLfpvvF/2vDNps53h+BS1UY0AKyX5HW4HZReUyvvEOHbm5IB03IFry/H6GYHroKzy3sbcj8MTdsaHdRYsdDSw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGkMvf5EbWmT4/hXL1PVEDYdDpTem7gTXR3WEGoxdhEuAiEAjshwT0UWKCUHCYyLh9MW5tIjGJwzZMCSXAhVwCIrB7A="}]},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"timoxley","email":"secoif@gmail.com"},"maintainers":[{"name":"timoxley","email":"secoif@gmail.com"}]},"1.0.1":{"name":"npm-path","version":"1.0.1","description":"Get a PATH with all executables available to npm scripts.","main":"index.js","bin":{"npm-path":"bin/npm-path"},"scripts":{"test":"faucet"},"author":{"name":"Tim Oxley"},"license":"MIT","devDependencies":{"faucet":"0.0.1","tape":"^2.12.3"},"dependencies":{"which":"^1.0.5"},"directories":{"test":"test"},"repository":{"type":"git","url":"https://github.com/timoxley/npm-path.git"},"keywords":["npm","run","executable"],"bugs":{"url":"https://github.com/timoxley/npm-path/issues"},"homepage":"https://github.com/timoxley/npm-path","gitHead":"ee9113d47b1d0ee27cefb94d9e40a160708d3ed4","_id":"npm-path@1.0.1","_shasum":"15d750efc9d8808194c721481dfa210fbde415c5","_from":".","_npmVersion":"1.4.16","_npmUser":{"name":"timoxley","email":"secoif@gmail.com"},"maintainers":[{"name":"timoxley","email":"secoif@gmail.com"}],"dist":{"shasum":"15d750efc9d8808194c721481dfa210fbde415c5","tarball":"https://registry.npmjs.org/npm-path/-/npm-path-1.0.1.tgz","integrity":"sha512-uDOftNMFFVbkvgs1UjDFoTkODL7WmvIMatdxjAsd5ZdJWc9bB/v5Fb4tYA5dZD0dBlh4JedAL/DTIUm7hcgo0w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDGYQWSXw8kzZs5NuY6vhHEpvQn7smXy8m6ms5tXqSiZwIgPnSRP+ub9JIk4fXhqwGN3Su4vFJfOszpqWKJW9s5lCc="}]}},"1.0.2":{"name":"npm-path","version":"1.0.2","description":"Get a PATH with all executables available to npm scripts.","main":"index.js","bin":{"npm-path":"bin/npm-path"},"scripts":{"test":"faucet"},"author":{"name":"Tim Oxley"},"license":"MIT","devDependencies":{"faucet":"0.0.1","tape":"^4.0.0"},"dependencies":{"which":"^1.1.1"},"directories":{"test":"test"},"repository":{"type":"git","url":"git+https://github.com/timoxley/npm-path.git"},"keywords":["npm","run","executable"],"bugs":{"url":"https://github.com/timoxley/npm-path/issues"},"homepage":"https://github.com/timoxley/npm-path","gitHead":"cf614414bdde419842028dbdbd9e8d404e964a6b","_id":"npm-path@1.0.2","_shasum":"e7f6ecf5e51f8ef972cbaa3b2c29cebc2d69a870","_from":".","_npmVersion":"2.8.3","_nodeVersion":"1.8.1","_npmUser":{"name":"timoxley","email":"secoif@gmail.com"},"maintainers":[{"name":"timoxley","email":"secoif@gmail.com"}],"dist":{"shasum":"e7f6ecf5e51f8ef972cbaa3b2c29cebc2d69a870","tarball":"https://registry.npmjs.org/npm-path/-/npm-path-1.0.2.tgz","integrity":"sha512-FIKePL1aWXqipibCjzrqDQxqSsAymXU/LXP2g215o/jFdo1XrZ1zhG6HFJaje4LLtaezTezPpaSvN04odJo3RQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID0MhP5uP+vVecuEzQDKB6zz8AWv56v/jH2z0CS8ZK3RAiEAmqhESJpzG2R8HHTV84SFwEq6ctb4jRaJhfB/r5zQhL8="}]}},"1.1.0":{"name":"npm-path","version":"1.1.0","description":"Get a PATH with all executables available to npm scripts.","main":"index.js","bin":{"npm-path":"bin/npm-path"},"scripts":{"test":"faucet"},"author":{"name":"Tim Oxley"},"license":"MIT","devDependencies":{"faucet":"0.0.1","npm":"^3.7.2","tape":"^4.4.0"},"dependencies":{"which":"^1.2.4"},"directories":{"test":"test"},"repository":{"type":"git","url":"git+https://github.com/timoxley/npm-path.git"},"keywords":["npm","run","executable"],"bugs":{"url":"https://github.com/timoxley/npm-path/issues"},"homepage":"https://github.com/timoxley/npm-path","gitHead":"e1e9acac92fe51f9a86076ae975b03f7d9d9cee0","_id":"npm-path@1.1.0","_shasum":"0474ae00419c327d54701b7cf2cd05dc88be1140","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.2.4","_npmUser":{"name":"timoxley","email":"secoif@gmail.com"},"maintainers":[{"name":"timoxley","email":"secoif@gmail.com"}],"dist":{"shasum":"0474ae00419c327d54701b7cf2cd05dc88be1140","tarball":"https://registry.npmjs.org/npm-path/-/npm-path-1.1.0.tgz","integrity":"sha512-wsL+YXGWlE3DWEqhpgKdt0RWxQrHKpVZ5u6uDYFSpxrxKYVPOctOun8q77VwD02zPTQD4wkc35elWPcocaICag==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBmzCXE7KcSsJlslMEGfH+4TmXav1HzzHm1G3LVb2+JuAiEAuoRkkS8gXxPzLEdsa3AAfFQDeb6lmPmx35uRSrMYPJs="}]},"_npmOperationalInternal":{"host":"packages-6-west.internal.npmjs.com","tmp":"tmp/npm-path-1.1.0.tgz_1455592355776_0.19419350288808346"}},"2.0.0":{"name":"npm-path","version":"2.0.0","description":"Get a PATH with all executables available to npm scripts.","main":"index.js","bin":{"npm-path":"bin/npm-path"},"scripts":{"test":"faucet && standard *.js test/*.js bin/*.js"},"author":{"name":"Tim Oxley"},"license":"MIT","engines":{"node":">=4.4.5"},"devDependencies":{"faucet":"0.0.1","npm":"^3.10.5","standard":"^7.1.2","tape":"^4.6.0"},"dependencies":{"which":"^1.2.10"},"directories":{"test":"test"},"repository":{"type":"git","url":"git+https://github.com/timoxley/npm-path.git"},"keywords":["npm","run","executable"],"bugs":{"url":"https://github.com/timoxley/npm-path/issues"},"homepage":"https://github.com/timoxley/npm-path","gitHead":"20c7c84ff84acbefdddb4821a23ddf18f9857958","_id":"npm-path@2.0.0","_shasum":"13d389363a2377b7d054f1be206eed0b90f5c72f","_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":"13d389363a2377b7d054f1be206eed0b90f5c72f","tarball":"https://registry.npmjs.org/npm-path/-/npm-path-2.0.0.tgz","integrity":"sha512-WAJge76gs8g6mH9E76+/ntx3aAzskUcslH6M0Wq41Fgpf2c0Oyjz33EtjCsV/3A43UYrSl1IMPk8m0tUHtbpMw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDrIIijtBePv80O/LJ5Usjgn8VOLY2ZcOuy9g0/LtcCXgIhANAELV15pLf+veJHpEx1vLG64HwzS6Jx97iNQGYuEMH+"}]},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/npm-path-2.0.0.tgz_1469164402963_0.8452480351552367"}},"2.0.1":{"name":"npm-path","version":"2.0.1","description":"Get a PATH with all executables available to npm scripts.","main":"index.js","bin":{"npm-path":"bin/npm-path"},"scripts":{"test":"faucet && standard *.js test/*.js bin/*.js"},"author":{"name":"Tim Oxley"},"license":"MIT","engines":{"node":">=4.2.0"},"devDependencies":{"faucet":"0.0.1","npm":"^3.10.5","standard":"^7.1.2","tape":"^4.6.0"},"dependencies":{"which":"^1.2.10"},"directories":{"test":"test"},"repository":{"type":"git","url":"git+https://github.com/timoxley/npm-path.git"},"keywords":["npm","run","executable"],"bugs":{"url":"https://github.com/timoxley/npm-path/issues"},"homepage":"https://github.com/timoxley/npm-path","gitHead":"6a8ea2a3dbdf35ab6fb46cbd90b31b9763aa9f53","_id":"npm-path@2.0.1","_shasum":"834ead081de1ab1e2cc84f2379ac5dc014a76ee9","_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":"834ead081de1ab1e2cc84f2379ac5dc014a76ee9","tarball":"https://registry.npmjs.org/npm-path/-/npm-path-2.0.1.tgz","integrity":"sha512-dzc55f+HEgYvWowFLKVBCHI+cSEVCztA2G5vFGKbFBEKzghpXQxVsVOv7J022o4jOiBojibFg/+G1gqjhHYELQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAzwvL3aWPHJ3msivkDvU6zFX7FavXXsyFPTdBOVwGJvAiAVNV3SHRumMae0w/OuUP1e7MJq4Q/Tjbg/Masrro9IFQ=="}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/npm-path-2.0.1.tgz_1469164784519_0.8126495121978223"}},"2.0.2":{"name":"npm-path","version":"2.0.2","description":"Get a PATH with all executables available to npm scripts.","main":"index.js","bin":{"npm-path":"bin/npm-path"},"scripts":{"test":"faucet && standard *.js test/*.js bin/*.js"},"author":{"name":"Tim Oxley"},"license":"MIT","engines":{"node":">=4.2.0"},"devDependencies":{"faucet":"0.0.1","npm":"^3.10.5","standard":"^7.1.2","tape":"^4.6.0"},"dependencies":{"which":"^1.2.10"},"directories":{"test":"test"},"repository":{"type":"git","url":"git+https://github.com/timoxley/npm-path.git"},"keywords":["npm","run","executable"],"bugs":{"url":"https://github.com/timoxley/npm-path/issues"},"homepage":"https://github.com/timoxley/npm-path","gitHead":"f9248253470abd003d3898a8b7b69ede3426d30d","_id":"npm-path@2.0.2","_shasum":"6462f098bb38e21e335a8c6f42d21d7b57f098c8","_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":"6462f098bb38e21e335a8c6f42d21d7b57f098c8","tarball":"https://registry.npmjs.org/npm-path/-/npm-path-2.0.2.tgz","integrity":"sha512-SFOMbaU7NFg/XPyOph32ChULmeYbeAZplP7f/Z0oVw0jxDeU8Crhfa3tKk0Xi08wc5IabtmSI16l4Dwamq1+pA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC5PBbRB9m9HsXvfSIMXg8HlHrFkizg6qrJs0MZOmz10AiEArEtzyuCfYukYaXQiO0i4dy2/CEMI+lRS2Yb2apoB/2E="}]},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/npm-path-2.0.2.tgz_1469170514865_0.36801144178025424"}},"2.0.3":{"name":"npm-path","version":"2.0.3","description":"Get a PATH with all executables available to npm scripts.","main":"index.js","bin":{"npm-path":"bin/npm-path"},"scripts":{"test":"faucet && standard *.js test/*.js bin/*.js"},"author":{"name":"Tim Oxley"},"license":"MIT","engines":{"node":">=4.2.0"},"devDependencies":{"faucet":"0.0.1","npm":"^3.10.5","standard":"^7.1.2","tape":"^4.6.0"},"dependencies":{"which":"^1.2.10"},"directories":{"test":"test"},"repository":{"type":"git","url":"git+https://github.com/timoxley/npm-path.git"},"keywords":["npm","run","executable"],"bugs":{"url":"https://github.com/timoxley/npm-path/issues"},"homepage":"https://github.com/timoxley/npm-path","gitHead":"1fc4d0913921eab480a438acb6cacf18212fa51e","_id":"npm-path@2.0.3","_shasum":"15cff4e1c89a38da77f56f6055b24f975dfb2bbe","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"timoxley","email":"secoif@gmail.com"},"dist":{"shasum":"15cff4e1c89a38da77f56f6055b24f975dfb2bbe","tarball":"https://registry.npmjs.org/npm-path/-/npm-path-2.0.3.tgz","integrity":"sha512-5Z3zcqK2x155uRLXww549OoEy8bldLezdd/pyaCIaDD+RQ0L5ZGkIFI2EXdoSL5tx0fOiZCUfgJUWBJmWaivhg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/Vuka+wQtG6znCIQFSLgMa4ejuT4iNzpoWq3nOsmbPQIgZtSjo/dhmGWnj6ddQOQzoySNE1vsWHd8VpnvFrSpXVI="}]},"maintainers":[{"name":"timoxley","email":"secoif@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/npm-path-2.0.3.tgz_1481673723327_0.30345648783259094"}},"2.0.4":{"name":"npm-path","version":"2.0.4","description":"Get a PATH with all executables available to npm scripts.","main":"index.js","bin":{"npm-path":"bin/npm-path"},"scripts":{"clean":"rimraf build-test && (rm *.js || true)","prebuild":"npm run clean","build":"babel src --out-dir . && babel test --out-dir build-test","prepublish":"not-in-publish || npm run build","tests-only":"tape build-test -r airbnb-js-shims | faucet","pretest":"standard src/* test/* bin/*","test":"npm run build && npm run tests-only"},"author":{"name":"Tim Oxley"},"license":"MIT","engines":{"node":">=0.8"},"devDependencies":{"airbnb-js-shims":"^1.4.0","babel-cli":"^6.26.0","babel-preset-airbnb":"^2.4.0","babel-register":"^6.26.0","faucet":"0.0.1","in-publish":"^2.0.0","npm":"^3.10.10","rimraf":"^2.6.2","standard":"^7.1.2","tape":"^4.8.0"},"dependencies":{"which":"^1.2.10"},"directories":{"test":"test"},"repository":{"type":"git","url":"git+https://github.com/timoxley/npm-path.git"},"keywords":["npm","run","executable"],"bugs":{"url":"https://github.com/timoxley/npm-path/issues"},"homepage":"https://github.com/timoxley/npm-path","gitHead":"71ba97c8d4129cb335d1d66aeb05526829f62372","_id":"npm-path@2.0.4","_npmVersion":"5.6.0","_nodeVersion":"8.9.1","_npmUser":{"name":"timoxley","email":"secoif@gmail.com"},"dist":{"integrity":"sha512-IFsj0R9C7ZdR5cP+ET342q77uSRdtWOlWpih5eC+lu29tIDbNEgDbzgVJ5UFvYHWhxDZ5TFkJafFioO0pPQjCw==","shasum":"c641347a5ff9d6a09e4d9bce5580c4f505278e64","tarball":"https://registry.npmjs.org/npm-path/-/npm-path-2.0.4.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEFu6AdRz34dPGsvDpZR/R5yz/A8X2SUdgnP45qFaIkxAiBdEq5vfIS/ohzLtsXru6W4pYiD/aaCY0aSdpJ6430wvQ=="}]},"maintainers":[{"name":"timoxley","email":"secoif@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/npm-path-2.0.4.tgz_1515229346160_0.10402124701067805"}}},"readme":"# npm-path\n\n### Get a PATH containing locally installed module executables.\n\n`npm-path` will get you a PATH with all of the executables available to npm scripts, without booting up all of npm(1).\n\n#### `npm-path` will set your PATH to include:\n\n* All of the `node_modules/.bin` directories from the current directory, up through all of its parents. This allows you to invoke the executables for any installed modules. e.g. if `mocha` is installed a dependency of the current module, then `mocha` will be available on a `npm-path` generated `$PATH`.\n* The directory containing the current `node` executable, so any scripts that invoke `node` will execute the same `node`.\n* Current npm's `node-gyp` directory, so the `node-gyp` bundled with `npm` can be used.\n\n## Usage\n\n### Command-line\n\n```bash\n# Prints the augmented PATH to the console\n> npm-path\n# /usr/local/lib/node_modules/npm/bin/node-gyp-bin:.../node_modules/.bin:/.../usr/local/bin:/usr/local/sbin: ... etc\n```\n\nCalling `npm-path` from the commandline is the equivalent of executing an npm script with the body `echo $PATH`, but without all of the overhead of booting or depending on `npm`.\n\n### Set PATH\n\nThis will set the augmented PATH for the current process environment, or an environment you supply.\n\n```js\nvar npmPath = require('npm-path')\nvar PATH = npmPath.PATH // get platform independent PATH key\n\nnpmPath(function(err, $PATH) {\n  \n  // Note: current environment is modified!\n  console.log(process.env[PATH] == $PATH) // true\n  \n  console.log($PATH)\n  // /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/.../.bin:/usr/local/bin: ...etc\n  \n})\n\n// more explicit alternative syntax\nnpmPath.set(function(err, $PATH) {\n  // ...\n})\n```\n\n#### Synchronous Alternative\n\n```js\n\n//  supplying no callback will execute method synchronously\nvar $PATH = npmPath()\nconsole.log($PATH)\n\n// more explicit alternative syntax\n$PATH = npmPath.setSync()\n```\n\n#### Optional Options\n\n```js\nvar options = {\n  env: process.env, // default.\n  cwd: process.cwd() // default.\n}\n\nnpmPath(options, function(err, $PATH) {\n  // ...\n})\n\nnpmPath.setSync(options)\n\n  // ...\n\n```\n\n\n### Get PATH\n\nThis will get npm augmented PATH, but *does not modify the PATH in the environment*.\nTakes the exact same options as `set`.\n\n```js\nnpmPath.get(function(err, $PATH) {\n  console.log($PATH)\n  \n  // Note: current environment is NOT modified!\n  console.log(process.env[PATH] == $PATH) // false\n})\n\n// options is optional, takes same options as `npmPath.set`\nnpmPath.get(options, function(err, $PATH) {\n  console.log($PATH)\n})\n```\n\n#### Synchronous Alternative\n\n```js\n//  supplying no callback will execute method synchronously\nvar $PATH = npmPath.get()\nconsole.log($PATH)\nconsole.log(process.env[PATH] == $PATH) // false\n\n// more explicit alternative syntax\n$PATH = npmPath.getSync()\n\n```\n\n### Options\n\nBoth `set` and `get` take an optional options object, with optional `env` & `cwd` keys.\n\n* Set `options.env` if you wish to use something other than `process.env` (the default)\n* Set `options.cwd` if you wish to use something other than `process.cwd()` (the default)\n\nThere's also a `options.npm` property which you can set if you want `node-gyp` to be sourced from\nan alternative `npm` installation.\n\n### Get the PATH environment variable key\n\n```js\n// windows calls it's path \"Path\" usually, but this is not guaranteed.\nnpmPath.PATH // 'Path', probably\n\n// rest of the world\nnpmPath.PATH // 'PATH'\n\n```\n\n#### Example Usage\n\n```js\nprocess.env[npmPath.PATH] // get path environment variable\n\n// set path environment variable manually\nprocess.env[npmPath.PATH] = npmPath.get()\n\n// set path environment variable automatically\nnpmPath()\n```\n\n### Get the PATH separator\n\n```js\n// windows\nnpmPath.SEPARATOR // ';'\n\n// rest of the world\nnpmPath.SEPARATOR // ':'\n```\n\n## Credit\n\nPath lookup code adapted directly from npm.\n\nThanks to [Jordan Harband](https://github.com/ljharb) for his [hard work](https://github.com/timoxley/npm-path/pulls?q=is%3Apr+author%3Aljharb) adapting this to work on node 0.8.\n\n# License\n\nMIT\n","maintainers":[{"name":"timoxley","email":"secoif@gmail.com"}],"time":{"modified":"2022-06-22T08:35:17.731Z","created":"2014-04-20T23:11:25.218Z","1.0.0":"2014-04-20T23:11:25.218Z","1.0.1":"2014-06-23T04:20:58.125Z","1.0.2":"2015-06-10T18:43:20.384Z","1.1.0":"2016-02-16T03:12:37.661Z","2.0.0":"2016-07-22T05:13:26.084Z","2.0.1":"2016-07-22T05:19:44.759Z","2.0.2":"2016-07-22T06:55:17.902Z","2.0.3":"2016-12-14T00:02:03.574Z","2.0.4":"2018-01-06T09:02:26.237Z"},"author":{"name":"Tim Oxley"},"license":"MIT","readmeFilename":"Readme.md","homepage":"https://github.com/timoxley/npm-path","keywords":["npm","run","executable"],"repository":{"type":"git","url":"git+https://github.com/timoxley/npm-path.git"},"bugs":{"url":"https://github.com/timoxley/npm-path/issues"},"users":{"zeke":true,"garthk":true,"axelrindle":true,"krkahl":true}}