Changes the current .npmrc file in use.
- Allows the use of a default file to fallback to.
- Allows you to set a different npm config per project and have it commited into the project's repo.
- Small library (~70 locs).
- Optionally supports auto-switching.
- Supports bash and zsh.
- Does not hook
cd.
git clone git@github.com:BBC-News/npmrc-switcher.git
cd npmrc-switcher
npm install
npm link
If you want npmrc-switcher to auto-switch the current .npmrc file
between your different projects. Add this line to your .bash_profile or .zshrc or whatever it is you use.
source /path/to/npmrc-switcher/lib/auto.shnpmrc-switcher will check the current and parent directories for a .npmrc file.
If you wish to set a default npmrc file, simply create a file in your home directory called .npmrc.default.
npm uninstall npmrc-switcherIf you have the autoswitcher enabled you will need to remove that line from your bash or zsh profile.
-
chruby for the idea behind this project.
