node package manager
Painless code sharing. npm Orgs help your team discover, share, and reuse code. Create a free org »

envpm

envpm

Build Status npm install npm version js-standard-style License

easy directory-level configuration scoping for npm

example

installation

npm install -g envpm

usage

envpm proxies commands to npm, but (in the event of a .npmrc file in your current working directory or any directory up from that) uses the configuration information present in that file.

The only command provided by envpm is which, used as such:

envpm which

This will print the location to the .npmrc that envpm will source if run from your current working directory.

If you'd like to make npm dir aware all the time, put the following command in your .bashrc:

alias npm=envnpm

Important: Be sure to set a different cache directory in your overridden .npmrc so that your private cache doesn't interfere with your public cache (and vice versa). Here's an example (minimal) .npmrc:

registry=http://your.registry/
cache=/full/path/to/.local-cache

as a module

var envpm = require('envpm')
 
envpm(dir, args) // executes npm with args, 
                 // looking for .npmrc file starting in dir 

license

MIT