Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

local-or-home-npmrc

svnlto13.7kMIT1.1.0

Get the local npmrc with fallback to the global one that's in your home directory

user, home, homedir, local, dir, npm, npmrc

readme

local-or-home-npmrc Build Status

Greenkeeper badge

Get the local npmrc with fallback to the global one that's in your home directory

Useful in cases where you prefer a local .npmrc file over a global one.

Install

$ npm install --save local-or-home-npmrc

Usage

const npmrcLocation = require('local-or-home-npmrc');

console.log(npmrcLocation());
//=> '/Users/svenlito/code/project/.npmrc'

// And if there is no local .npmrc file:

const npmrcLocation = require('local-or-home-npmrc');

console.log(npmrcLocation());
//=> '/Users/svenlito/.npmrc'

License

MIT © Sven Lito