{"_id":"manage-path","_rev":"291960","name":"manage-path","description":"Cross-platform method to add a directory to your $PATH","dist-tags":{"latest":"2.0.0"},"maintainers":[{"name":"kentcdodds","email":"kent+npm@doddsfamily.us"}],"time":{"modified":"2021-06-03T18:52:17.000Z","created":"2015-10-21T20:29:23.440Z","2.0.0":"2015-10-21T22:08:39.853Z","1.0.1":"2015-10-21T21:45:50.647Z","1.0.0":"2015-10-21T20:29:23.440Z"},"users":{"kentcdodds":true},"author":{"name":"Kent C. Dodds","email":"kent@doddsfamily.us","url":"http://kentcdodds.com/"},"repository":{"type":"git","url":"git+https://github.com/kentcdodds/node-manage-path.git"},"versions":{"2.0.0":{"name":"manage-path","description":"Cross-platform method to add a directory to your $PATH","main":"dist/index.js","scripts":{"prebuild":"rm -rf dist && mkdir dist","build":"cd src && babel --ignore **/*.test.js -d ../dist . && cd ..","eslint:test":"eslint -c other/test.eslintrc --ignore-pattern '**/*.+(test|mock).js' src/","eslint:src":"eslint -c other/src.eslintrc --ignore-pattern '!**/*.+(test|mock).js' src/","eslint":"npm run eslint:test -s && npm run eslint:src -s","test":"istanbul cover -x *.test.js _mocha -- -R spec src/*.test.js --compilers js:babel/register","start":"mocha src/*.test.js -w . --compilers js:babel/register","check-coverage":"istanbul check-coverage --statements 100 --branches 100 --functions 100 --lines 100","report-coverage":"echo 'Reporting coverage stats' && cat ./coverage/lcov.info | codecov","commit":"git-cz","prepublish":"npm run build","postpublish":"publish-latest","semantic-release":"semantic-release pre && npm publish && semantic-release post"},"repository":{"type":"git","url":"git+https://github.com/kentcdodds/node-manage-path.git"},"keywords":["path","cross-platform"],"author":{"name":"Kent C. Dodds","email":"kent@doddsfamily.us","url":"http://kentcdodds.com/"},"license":"MIT","bugs":{"url":"https://github.com/kentcdodds/node-manage-path/issues"},"homepage":"https://github.com/kentcdodds/node-manage-path#readme","devDependencies":{"babel":"5.8.23","chai":"3.2.0","chai-string":"1.1.2","codecov.io":"0.1.6","commitizen":"2.1.0","cz-conventional-changelog":"1.1.4","eslint":"1.7.2","eslint-config-kentcdodds":"5.0.0","eslint-plugin-mocha":"0.5.1","ghooks":"0.3.2","istanbul":"0.3.19","mocha":"2.3.2","publish-latest":"1.0.2","semantic-release":"^4.3.5","validate-commit-msg":"1.0.0"},"config":{"ghooks":{"commit-msg":"./node_modules/.bin/validate-commit-msg && npm run eslint && npm t && npm run check-coverage && echo 'pre-commit checks good 👍'"}},"czConfig":{"path":"node_modules/cz-conventional-changelog/"},"version":"2.0.0","gitHead":"426b5775538dd4e23d9b34423957cf0a91251230","_id":"manage-path@2.0.0","_shasum":"f4cf8457b926eeee2a83b173501414bc76eb9597","_from":".","_npmVersion":"2.14.8","_nodeVersion":"4.2.1","_npmUser":{"name":"kentcdodds","email":"kent@doddsfamily.us"},"dist":{"shasum":"f4cf8457b926eeee2a83b173501414bc76eb9597","size":5943,"noattachment":false,"key":"/manage-path/-/manage-path-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/manage-path/download/manage-path-2.0.0.tgz"},"maintainers":[{"name":"kentcdodds","email":"kent+npm@doddsfamily.us"}],"directories":{},"publish_time":1445465319853,"_cnpm_publish_time":1445465319853,"_hasShrinkwrap":false},"1.0.1":{"name":"manage-path","description":"Cross-platform method to add a directory to your $PATH","main":"dist/index.js","scripts":{"prebuild":"rm -rf dist && mkdir dist","build":"cd src && babel --ignore **/*.test.js -d ../dist . && cd ..","eslint:test":"eslint -c other/test.eslintrc --ignore-pattern '**/*.+(test|mock).js' src/","eslint:src":"eslint -c other/src.eslintrc --ignore-pattern '!**/*.+(test|mock).js' src/","eslint":"npm run eslint:test -s && npm run eslint:src -s","test":"istanbul cover -x *.test.js _mocha -- -R spec src/*.test.js --compilers js:babel/register","start":"mocha src/*.test.js -w . --compilers js:babel/register","check-coverage":"istanbul check-coverage --statements 100 --branches 100 --functions 100 --lines 100","report-coverage":"echo 'Reporting coverage stats' && cat ./coverage/lcov.info | codecov","commit":"git-cz","prepublish":"npm run build","postpublish":"publish-latest","semantic-release":"semantic-release pre && npm publish && semantic-release post"},"repository":{"type":"git","url":"git+https://github.com/kentcdodds/node-manage-path.git"},"keywords":["path","cross-platform"],"author":{"name":"Kent C. Dodds","email":"kent@doddsfamily.us","url":"http://kentcdodds.com/"},"license":"MIT","bugs":{"url":"https://github.com/kentcdodds/node-manage-path/issues"},"homepage":"https://github.com/kentcdodds/node-manage-path#readme","devDependencies":{"babel":"5.8.23","chai":"3.2.0","chai-string":"1.1.2","codecov.io":"0.1.6","commitizen":"2.1.0","cz-conventional-changelog":"1.1.4","eslint":"1.7.2","eslint-config-kentcdodds":"5.0.0","eslint-plugin-mocha":"0.5.1","ghooks":"0.3.2","istanbul":"0.3.19","mocha":"2.3.2","publish-latest":"1.0.2","semantic-release":"^4.3.5","validate-commit-msg":"1.0.0"},"config":{"ghooks":{"commit-msg":"./node_modules/.bin/validate-commit-msg && npm run eslint && npm t && npm run check-coverage && echo 'pre-commit checks good 👍'"}},"czConfig":{"path":"node_modules/cz-conventional-changelog/"},"version":"1.0.1","gitHead":"bbdd67d360e3891caf0c982f0279bca0097ff666","_id":"manage-path@1.0.1","_shasum":"4cf329688bb478315b25babb7c3ce17dfca19203","_from":".","_npmVersion":"2.14.8","_nodeVersion":"4.2.1","_npmUser":{"name":"kentcdodds","email":"kent@doddsfamily.us"},"dist":{"shasum":"4cf329688bb478315b25babb7c3ce17dfca19203","size":5954,"noattachment":false,"key":"/manage-path/-/manage-path-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/manage-path/download/manage-path-1.0.1.tgz"},"maintainers":[{"name":"kentcdodds","email":"kent+npm@doddsfamily.us"}],"directories":{},"publish_time":1445463950647,"_cnpm_publish_time":1445463950647,"_hasShrinkwrap":false},"1.0.0":{"name":"manage-path","description":"Cross-platform method to add a directory to your $PATH","main":"dist/index.js","scripts":{"prebuild":"rm -rf dist && mkdir dist","build":"cd src && babel index.js get-path-var.js -d ../dist && cd ..","eslint":"eslint src/index.js src/get-path-var.js -c other/src.eslintrc && eslint src/*.test.js","test":"istanbul cover -x *.test.js _mocha -- -R spec src/*.test.js --compilers js:babel/register","start":"mocha src/*.test.js -w . --compilers js:babel/register","check-coverage":"istanbul check-coverage --statements 100 --branches 100 --functions 100 --lines 100","report-coverage":"echo 'Reporting coverage stats' && cat ./coverage/lcov.info | codecov","commit":"git-cz","prepublish":"npm run build","postpublish":"publish-latest","semantic-release":"semantic-release pre && npm publish && semantic-release post"},"repository":{"type":"git","url":"git+https://github.com/kentcdodds/node-manage-path.git"},"keywords":["path","cross-platform"],"author":{"name":"Kent C. Dodds","email":"kent@doddsfamily.us","url":"http://kentcdodds.com/"},"license":"MIT","bugs":{"url":"https://github.com/kentcdodds/node-manage-path/issues"},"homepage":"https://github.com/kentcdodds/node-manage-path#readme","devDependencies":{"babel":"5.8.23","chai":"3.2.0","chai-string":"1.1.2","codecov.io":"0.1.6","commitizen":"2.1.0","cz-conventional-changelog":"1.1.4","eslint":"1.7.2","eslint-config-kentcdodds":"5.0.0","eslint-plugin-mocha":"0.5.1","ghooks":"0.3.2","istanbul":"0.3.19","mocha":"2.3.2","publish-latest":"1.0.2","semantic-release":"^4.3.5","validate-commit-msg":"1.0.0"},"config":{"ghooks":{"commit-msg":"./node_modules/.bin/validate-commit-msg && npm run eslint && npm t && npm run check-coverage && echo 'pre-commit checks good 👍'"}},"czConfig":{"path":"node_modules/cz-conventional-changelog/"},"version":"1.0.0","gitHead":"412276f416aa425de4dbd95f59c47d27a314c72c","_id":"manage-path@1.0.0","_shasum":"93faaa2aa89177c2302377151724b496b395cd2d","_from":".","_npmVersion":"2.14.8","_nodeVersion":"4.2.1","_npmUser":{"name":"kentcdodds","email":"kent@doddsfamily.us"},"dist":{"shasum":"93faaa2aa89177c2302377151724b496b395cd2d","size":5867,"noattachment":false,"key":"/manage-path/-/manage-path-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/manage-path/download/manage-path-1.0.0.tgz"},"maintainers":[{"name":"kentcdodds","email":"kent+npm@doddsfamily.us"}],"directories":{},"publish_time":1445459363440,"_cnpm_publish_time":1445459363440,"_hasShrinkwrap":false}},"readme":"# manage-path\n\nStatus:\n[![npm version](https://img.shields.io/npm/v/manage-path.svg?style=flat-square)](https://www.npmjs.org/package/manage-path)\n[![npm downloads](https://img.shields.io/npm/dm/manage-path.svg?style=flat-square)](http://npm-stat.com/charts.html?package=manage-path&from=2015-09-01)\n[![Build Status](https://img.shields.io/travis/kentcdodds/node-manage-path.svg?style=flat-square)](https://travis-ci.org/kentcdodds/node-manage-path)\n[![Code Coverage](https://img.shields.io/codecov/c/github/kentcdodds/node-manage-path.svg?style=flat-square)](https://codecov.io/github/kentcdodds/node-manage-path)\n\nThis micro-lib allows you to alter the `$PATH` in a cross-platform way.\n\n## Main Usage\n\n```javascript\nvar path = require('path')\nvar managePath = require('manage-path')\nvar alterPath = managePath(process.env)\nalterPath.shift(path.join(process.cwd(), 'node_modules', '.bin') // add one path to the beginning\n// process.env.PATH now starts with the `.bin` in your `node_modules` directory :-)\n// unless you happen to be running on windows, in which case it *might* be process.env.Path :-)\n// but you don't have to think about that...\n\nalterPath.push('~/custombin', '/usr/other/bin') // add multiple paths to the end\nalterPath.push(['~/foo/bar', '/bar/foo/bin']) // array-style multi-path add for ultimate flexibility :-)\n\n// need to get the path value cross-platform?\nalterPath.get() // <-- returns value of PATH or Path... depending :-)\n\n// want to restore the path to what it was before you mucked with it?\n// just call the function you get back:\nalterPath.restore()\n```\n\n## options\n\nThese are options you pass as an object to `managePath`\n\n### platform\n\nAllows you to specify your own platform. Defaults to `process.platform`. Currently the only meaningful value is\n`'win32'`. This option is mainly available for testing purposes.\n\n# Other info\n\nLICENSE -> MIT\n\nMuch of the original code for this came from [npm/npm](https://github.com/npm/npm)\n\n","_attachments":{},"homepage":"https://github.com/kentcdodds/node-manage-path#readme","bugs":{"url":"https://github.com/kentcdodds/node-manage-path/issues"},"license":"MIT"}