4.0.1 • Published 2 years ago

global-directory v4.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

global-directory

Get the directory of globally installed packages and binaries

Uses the same resolution logic as npm and yarn.

Install

npm install global-directory

Usage

import globalDirectory from 'global-directory';

console.log(globalDirectory.npm.prefix);
//=> '/usr/local'

console.log(globalDirectory.npm.packages);
//=> '/usr/local/lib/node_modules'

console.log(globalDirectory.npm.binaries);
//=> '/usr/local/bin'

console.log(globalDirectory.yarn.packages);
//=> '/Users/sindresorhus/.config/yarn/global/node_modules'

API

globalDirectory

npm

yarn

packages

The directory with globally installed packages.

Equivalent to npm root --global.

binaries

The directory with globally installed binaries.

Equivalent to npm bin --global.

prefix

The directory with directories for packages and binaries. You probably want either of the above.

Equivalent to npm prefix --global.

Related

is-installed-globally@commitlint/resolve-extendsresolve-global@everything-registry/sub-chunk-1770@pradeepgudipati/kovaad-chat-ui-kit-stylesmangudinlagirajin@tomw2w/my-nuxt-layeranakketigaanaklanangteaanakwadontea@zsnmwy/cli@ahmed_shaban123/react-native-currencyinput@codetypo/codetypo-resolver@config-resume/clitehmusimhujan@pavelhaj93/grohe-devstack-poc@pavelhaj93/grohe-devstack-pocv10@pavelhaj93/grohe-devstack-pocv11@pavelhaj93/grohe-devstack-pocv12@pavelhaj93/grohe-devstack-pocv13@pavelhaj93/grohe-devstack-pocv14@pavelhaj93/grohe-devstack-pocv15@pavelhaj93/grohe-devstack-pocv16@pavelhaj93/grohe-devstack-pocv17@pavelhaj93/grohe-devstack-pocv18@pavelhaj93/grohe-devstack-pocv2@pavelhaj93/grohe-devstack-pocv20@pavelhaj93/grohe-devstack-pocv21@pavelhaj93/grohe-devstack-pocv22@pavelhaj93/grohe-devstack-pocv23@pavelhaj93/grohe-devstack-pocv3@pavelhaj93/grohe-devstack-pocv4@pavelhaj93/grohe-devstack-pocv5@pavelhaj93/grohe-devstack-pocv6@pavelhaj93/grohe-devstack-pocv7@pavelhaj93/grohe-devstack-pocv8@pavelhaj93/grohe-devstack-pocv9nuxtpaginationspatepangdeuisedanbosokreact-native-ideo-rn-notificationsreact-native-payu-paymentreact-native-lazp-device-inforeact-native-test-multiplier-librarypileuleuyantearesolve-import-pathslidev-cli-magiclidesslidev-cli-magicslidescnx-custom-slidev-clidamaranbalm-clibalmgerimismalamsenin@syedt/hellosdkdomaincomponent@slidev/cli@smslidev/cli@cspell/cspell-resolver@aruntestpayment/react-native-payu-payment@cybernetyx/custom-slidev-cli@cybernetyx-slidev/cli@orgbluetooth/react-native-arunpayupayment@orgbluetooth/react-native-payupayment@kolibrijs/cli@kolibry/cli@rafaeljcamara/xinjects@nuxt/devtools-wizard-edge
4.0.1

2 years ago

4.0.0

2 years ago