local-or-home-npmrc

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

MIT 2 个版本
安装
npm install local-or-home-npmrc
yarn add local-or-home-npmrc
pnpm add local-or-home-npmrc
bun add local-or-home-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

版本列表
1.1.0 2017-07-22
1.0.0 2017-06-08