Skip to content
This repository was archived by the owner on Jan 9, 2020. It is now read-only.

BBC-archive/npmrc-switcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npmrc-switcher

Changes the current .npmrc file in use.

Features

  • 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.

Anti-Features

  • Does not hook cd.

Install

git clone [email protected]:BBC-News/npmrc-switcher.git
cd npmrc-switcher
npm install
npm link

Auto-Switching

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.sh

npmrc-switcher will check the current and parent directories for a .npmrc file.

Default npmrc

If you wish to set a default npmrc file, simply create a file in your home directory called .npmrc.default.

Uninstall

npm uninstall npmrc-switcher

If you have the autoswitcher enabled you will need to remove that line from your bash or zsh profile.

Credits

About

Changes the current .npmrc file in use.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •