{"_id":"add-to-path","_rev":"141414","name":"add-to-path","description":"Cross-platform method to add a directory to your $PATH","dist-tags":{"latest":"1.1.2"},"maintainers":[{"name":"kentcdodds","email":"kent+npm@doddsfamily.us"}],"time":{"modified":"2021-06-03T11:27:12.000Z","created":"2015-09-11T06:18:24.253Z","1.1.2":"2015-09-26T02:05:53.112Z","1.1.1":"2015-09-26T02:02:01.750Z","1.1.0":"2015-09-11T06:59:27.475Z","1.0.0":"2015-09-11T06:18:24.253Z"},"users":{},"author":{"name":"Kent C. Dodds","email":"kent@doddsfamily.us","url":"http://kentcdodds.com/"},"repository":{"type":"git","url":"git+https://github.com/kentcdodds/node-add-to-path.git"},"versions":{"1.1.2":{"name":"add-to-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-add-to-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-add-to-path/issues"},"homepage":"https://github.com/kentcdodds/node-add-to-path#readme","devDependencies":{"babel":"5.8.23","chai":"3.2.0","chai-string":"1.1.2","codecov.io":"0.1.6","commitizen":"1.0.4","cz-conventional-changelog":"1.1.0","eslint":"1.3.1","eslint-config-kentcdodds":"4.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.4","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.1.2","gitHead":"8506cb6733d5595c53fbebaadefcc1c361d8d3d6","_id":"add-to-path@1.1.2","_shasum":"fe3dc73daa309c9fb93c4a6a336e7f69f4c68afc","_from":".","_npmVersion":"2.14.6","_nodeVersion":"4.0.0","_npmUser":{"name":"kentcdodds","email":"kent@doddsfamily.us"},"dist":{"shasum":"fe3dc73daa309c9fb93c4a6a336e7f69f4c68afc","size":4804,"noattachment":false,"key":"/add-to-path/-/add-to-path-1.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/add-to-path/download/add-to-path-1.1.2.tgz"},"maintainers":[{"name":"kentcdodds","email":"kent+npm@doddsfamily.us"}],"directories":{},"publish_time":1443233153112,"_cnpm_publish_time":1443233153112,"_hasShrinkwrap":false},"1.1.1":{"name":"add-to-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-add-to-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-add-to-path/issues"},"homepage":"https://github.com/kentcdodds/node-add-to-path#readme","devDependencies":{"babel":"5.8.23","chai":"3.2.0","chai-string":"1.1.2","codecov.io":"0.1.6","commitizen":"1.0.4","cz-conventional-changelog":"1.1.0","eslint":"1.3.1","eslint-config-kentcdodds":"4.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.4","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.1.1","gitHead":"1b00fe06d5c44e2243f78de5ac64571dab3a032b","_id":"add-to-path@1.1.1","_shasum":"10fd8a1f71096c742d921d40589ff33d4a9f823d","_from":".","_npmVersion":"2.14.6","_nodeVersion":"4.0.0","_npmUser":{"name":"kentcdodds","email":"kent@doddsfamily.us"},"dist":{"shasum":"10fd8a1f71096c742d921d40589ff33d4a9f823d","size":4769,"noattachment":false,"key":"/add-to-path/-/add-to-path-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/add-to-path/download/add-to-path-1.1.1.tgz"},"maintainers":[{"name":"kentcdodds","email":"kent+npm@doddsfamily.us"}],"directories":{},"publish_time":1443232921750,"_cnpm_publish_time":1443232921750,"_hasShrinkwrap":false},"1.1.0":{"name":"add-to-path","description":"Cross-platform method to add a directory to your $PATH","main":"src/index.js","scripts":{"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","semantic-release":"semantic-release pre && npm publish && semantic-release post"},"repository":{"type":"git","url":"git+https://github.com/kentcdodds/node-add-to-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-add-to-path/issues"},"homepage":"https://github.com/kentcdodds/node-add-to-path#readme","devDependencies":{"babel":"5.8.23","chai":"3.2.0","chai-string":"1.1.2","codecov.io":"0.1.6","commitizen":"1.0.4","cz-conventional-changelog":"1.1.0","eslint":"1.3.1","eslint-config-kentcdodds":"4.0.0","eslint-plugin-mocha":"0.5.1","ghooks":"0.3.2","istanbul":"0.3.19","mocha":"2.3.2","semantic-release":"^4.3.4","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.1.0","gitHead":"6d7b515fa927618ca37a15290042f66ddbd0e7d1","_id":"add-to-path@1.1.0","_shasum":"df2c0bd1d94c35241b6903c411ee8acb18483096","_from":".","_npmVersion":"2.14.3","_nodeVersion":"4.0.0","_npmUser":{"name":"kentcdodds","email":"kent@doddsfamily.us"},"dist":{"shasum":"df2c0bd1d94c35241b6903c411ee8acb18483096","size":4575,"noattachment":false,"key":"/add-to-path/-/add-to-path-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/add-to-path/download/add-to-path-1.1.0.tgz"},"maintainers":[{"name":"kentcdodds","email":"kent+npm@doddsfamily.us"}],"directories":{},"publish_time":1441954767475,"_cnpm_publish_time":1441954767475,"_hasShrinkwrap":false},"1.0.0":{"name":"add-to-path","description":"Cross-platform method to add a directory to your $PATH","main":"src/index.js","scripts":{"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","semantic-release":"semantic-release pre && npm publish && semantic-release post"},"repository":{"type":"git","url":"git+https://github.com/kentcdodds/node-add-to-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-add-to-path/issues"},"homepage":"https://github.com/kentcdodds/node-add-to-path#readme","devDependencies":{"babel":"5.8.23","chai":"3.2.0","chai-string":"1.1.2","codecov.io":"0.1.6","commitizen":"1.0.4","cz-conventional-changelog":"1.1.0","eslint":"1.3.1","eslint-config-kentcdodds":"4.0.0","eslint-plugin-mocha":"0.5.1","ghooks":"0.3.2","istanbul":"0.3.19","mocha":"2.3.2","semantic-release":"^4.3.4","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":"f4161ad2ec97886c023a0d1adef39cd6d44ab362","_id":"add-to-path@1.0.0","_shasum":"d3ceca8314abd12cd202b0f74f8c2d617aeb2bbc","_from":".","_npmVersion":"2.14.3","_nodeVersion":"4.0.0","_npmUser":{"name":"kentcdodds","email":"kent@doddsfamily.us"},"dist":{"shasum":"d3ceca8314abd12cd202b0f74f8c2d617aeb2bbc","size":4189,"noattachment":false,"key":"/add-to-path/-/add-to-path-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/add-to-path/download/add-to-path-1.0.0.tgz"},"maintainers":[{"name":"kentcdodds","email":"kent+npm@doddsfamily.us"}],"directories":{},"publish_time":1441952304253,"_cnpm_publish_time":1441952304253,"_hasShrinkwrap":false}},"readme":"# add-to-path\n\nStatus:\n[![npm version](https://img.shields.io/npm/v/add-to-path.svg?style=flat-square)](https://www.npmjs.org/package/add-to-path)\n[![npm downloads](https://img.shields.io/npm/dm/add-to-path.svg?style=flat-square)](http://npm-stat.com/charts.html?package=add-to-path&from=2015-09-01)\n[![Build Status](https://img.shields.io/travis/kentcdodds/node-add-to-path.svg?style=flat-square)](https://travis-ci.org/kentcdodds/node-add-to-path)\n[![Code Coverage](https://img.shields.io/codecov/c/github/kentcdodds/node-add-to-path.svg?style=flat-square)](https://codecov.io/github/kentcdodds/node-add-to-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 addToPath = require('add-to-path');\nvar restorePath = addToPath(path.join(process.cwd(), 'node_modules', '.bin'));\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// want to restore the path to what it was before you mucked with it?\n// just call the function you get back:\nrestorePath();\n\n// wanna add several paths at once? Done!\naddToPath(['/foo/bar/.bin', '/bar/foo/.bin']);\n```\n\n\n## options\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### append\n\nDefaults to `undefined`, but when set to `true` will add the directory you pass to the end (rather than the beginning).\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-add-to-path#readme","bugs":{"url":"https://github.com/kentcdodds/node-add-to-path/issues"},"license":"MIT"}