Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inBook a demo

add-to-path

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Issues
File Explorer

Advanced tools

add-to-path

Cross-platform method to add a directory to your $PATH

    1.1.2latest

Version published
Maintainers
1
Weekly downloads
12
increased by20%

Weekly downloads

Changelog

Source

v1.1.2

<a name"1.1.2"></a>

1.1.2 (2015-09-26)

Bug Fixes
  • build:
    • Adding some code to force the build to run again so it publishes to latest (8506cb67)
    • Adding some code to force the build to run again so it publishes to latest (2e033eea)
    • pushd is not available on travis :-( (1b00fe06)
  • lib: Changing main to be dist version (e7195bbd)

Readme

Source

add-to-path

Status: npm version npm downloads Build Status Code Coverage

This micro-lib allows you to alter the $PATH in a cross-platform way.

Main Usage

var path = require('path'); var addToPath = require('add-to-path'); var restorePath = addToPath(path.join(process.cwd(), 'node_modules', '.bin')); // process.env.PATH now starts with the `.bin` in your `node_modules` directory :-) // unless you happen to be running on windows, in which case it *might* be process.env.Path :-) // but you don't have to think about that... // want to restore the path to what it was before you mucked with it? // just call the function you get back: restorePath(); // wanna add several paths at once? Done! addToPath(['/foo/bar/.bin', '/bar/foo/.bin']);

options

platform

Allows you to specify your own platform. Defaults to process.platform. Currently the only meaningful value is 'win32'. This option is mainly available for testing purposes.

append

Defaults to undefined, but when set to true will add the directory you pass to the end (rather than the beginning).

Other info

LICENSE -> MIT

Much of the original code for this came from npm/npm

Keywords

FAQs

What is add-to-path?

Cross-platform method to add a directory to your $PATH

Is add-to-path popular?

The npm package add-to-path receives a total of 8 weekly downloads. As such, add-to-path popularity was classified as not popular.

Is add-to-path well maintained?

We found that add-to-path demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.It has 1 open source maintainer collaborating on the project.

Last updated on 26 Sep 2015

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc