1
|
# global-modules [](https://www.npmjs.com/package/global-modules) [](https://npmjs.org/package/global-modules) [](https://npmjs.org/package/global-modules) [](https://travis-ci.org/jonschlinkert/global-modules)
|
2
|
|
3
|
> The directory used by npm for globally installed npm modules.
|
4
|
|
5
|
Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
|
6
|
|
7
|
## Install
|
8
|
|
9
|
Install with [npm](https://www.npmjs.com/):
|
10
|
|
11
|
```sh
|
12
|
$ npm install --save global-modules
|
13
|
```
|
14
|
|
15
|
## Usage
|
16
|
|
17
|
```js
|
18
|
const globalModules = require('global-modules');
|
19
|
console.log(globalModules);
|
20
|
//=> '/usr/local/lib/node_modules'
|
21
|
```
|
22
|
_(Note that this path might be different based on platform, user-defined configuration settings, etc)_
|
23
|
|
24
|
## About
|
25
|
|
26
|
<details>
|
27
|
<summary><strong>Contributing</strong></summary>
|
28
|
|
29
|
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
30
|
|
31
|
</details>
|
32
|
|
33
|
<details>
|
34
|
<summary><strong>Running Tests</strong></summary>
|
35
|
|
36
|
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
|
37
|
|
38
|
```sh
|
39
|
$ npm install && npm test
|
40
|
```
|
41
|
|
42
|
</details>
|
43
|
|
44
|
<details>
|
45
|
<summary><strong>Building docs</strong></summary>
|
46
|
|
47
|
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
|
48
|
|
49
|
To generate the readme, run the following command:
|
50
|
|
51
|
```sh
|
52
|
$ npm install -g verbose/verb#dev verb-generate-readme && verb
|
53
|
```
|
54
|
|
55
|
</details>
|
56
|
|
57
|
### Related projects
|
58
|
|
59
|
You might also be interested in these projects:
|
60
|
|
61
|
* [git-config-path](https://www.npmjs.com/package/git-config-path): Resolve the path to the user's local or global .gitconfig. | [homepage](https://github.com/jonschlinkert/git-config-path "Resolve the path to the user's local or global .gitconfig.")
|
62
|
* [global-prefix](https://www.npmjs.com/package/global-prefix): Get the npm global path prefix. | [homepage](https://github.com/jonschlinkert/global-prefix "Get the npm global path prefix.")
|
63
|
* [npm-paths](https://www.npmjs.com/package/npm-paths): Returns an array of unique "npm" directories based on the user's platform and environment. | [homepage](https://github.com/jonschlinkert/npm-paths "Returns an array of unique "npm" directories based on the user's platform and environment.")
|
64
|
|
65
|
### Contributors
|
66
|
|
67
|
| **Commits** | **Contributor** |
|
68
|
| --- | --- |
|
69
|
| 20 | [jonschlinkert](https://github.com/jonschlinkert) |
|
70
|
| 1 | [Kikobeats](https://github.com/Kikobeats) |
|
71
|
|
72
|
### Author
|
73
|
|
74
|
**Jon Schlinkert**
|
75
|
|
76
|
* [GitHub Profile](https://github.com/jonschlinkert)
|
77
|
* [Twitter Profile](https://twitter.com/jonschlinkert)
|
78
|
* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
|
79
|
|
80
|
### License
|
81
|
|
82
|
Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).
|
83
|
Released under the [MIT License](LICENSE).
|
84
|
|
85
|
***
|
86
|
|
87
|
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on December 14, 2018._
|