4.0.0 • Published 2 years ago

global-dirs v4.0.0

Weekly downloads
10,246,040
License
MIT
Repository
github
Last release
2 years ago

global-dirs

Get the directory of globally installed packages and binaries

Uses the same resolution logic as npm and yarn.

Install

$ npm install global-dirs

Usage

const globalDirectories = require('global-dirs');

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

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

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

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

API

globalDirectories

npm

yarn

packages

Directory with globally installed packages.

Equivalent to npm root --global.

binaries

Directory with globally installed binaries.

Equivalent to npm bin --global.

prefix

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

Equivalent to npm prefix --global.

Related


cuc-gaf@prisma/sdkarchetype-libraryeasy-select-rnreact-native-bluetooth2killi8n-react-native-fast-image@cashremit/cr-streamline-iconsgloabl-binairscanairscan-example@ec-nordbund/cdnuxt-devtoolsreact-native-esc-pos-sahaab@borisovart/atol-kkt-moduledeneme323112@steven-torres/jsxr@ntt_app/react-native-custom-notificationdiscord-music-botsreact-native-covid-sdkrotareneg-ipacnysa@jttechnic/interpreter@saeon/ol-react@saeon/quick-formbeet-climysql-formatreact-native-printer-brothersreact-native-shekhar-bridge-testcogoportutilsdyx-react@oiti/documentoscopy-react-nativequoc-testunblock-block-save-variables@supaglue/cliextra-build.minluminos-ui-core@everything-registry/sub-chunk-1770jawwy-sdkjawwy_gamification_releasereact-native-sphereuisphereuijawwy_libraryreact-native-credit-card-pkgreact-native-jawwy_samplegriffin-ui-librarytest-library-123test-haptik-libvusionwifi_configuration_packagewhatsconcstorybook-nuxttest-zeo-collectsvavatarsweetalert2-denazificationthanos-glovevscode-graphql-schema-linter-gopuffvision-camera-plugin-face-detectorvision-camera-plugin-scan-facesvision-camera-base64-resizedv3-cliv3webpack-clivantiq-reactvite_vue3_ts_ssssdddddyyyy@djp6/tpl-cli-vue@criticalmanufacturing/cli@cs6/react-native-test-native-view-library@conet.project/mvp-dl@con-test/react-native-concent-common@damruravihara/react-native-testing-package@corelmax/react-native-my2c2p-sdk@cpany/cli@praella/localisationistis-linkedjrennsoh88-react-native-scroll-indicatorjesh-calculationjnf-accesscontrol-rnttljordy-frijters-test-libkhaled-salem-custom-componentslcap-minjawwy_library_newjawy_library_v1gamification-jawwy-libraryframework_test_library_sixdee_new_jawwytest_lib_module_aarquickcapture_react_nativern-agora-ios-mego-clireact-native-omental-frameworkreact-native-sixdee_test_libss-actionstingzi-vuepresstrackcitytmui-clitwine-libtwine-library@amiruldev/wajs@amirdiafi/react-native-ios-haptics@apardellass/react-native-audio-stream@aquestsrl/create-app-cli-utils@angangii/frontendpractice@asyncapi/generator@aviinash_jha/react-native-test_multiply
4.0.0

2 years ago

3.0.1

3 years ago

3.0.0

4 years ago

2.1.0

4 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.0

6 years ago

0.1.1

8 years ago

0.1.0

8 years ago