https://github.com/shinnn/npm-cli-path
Resolve the path of `npm-cli.js` included in the globally installed npm CLI
https://github.com/shinnn/npm-cli-path
async npm promise
Last synced: 4 months ago
JSON representation
Resolve the path of `npm-cli.js` included in the globally installed npm CLI
- Host: GitHub
- URL: https://github.com/shinnn/npm-cli-path
- Owner: shinnn
- License: isc
- Created: 2015-11-17T20:30:28.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-05-31T01:49:46.000Z (about 6 years ago)
- Last Synced: 2025-03-03T18:49:10.107Z (4 months ago)
- Topics: async, npm, promise
- Language: JavaScript
- Size: 129 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# npm-cli-path
[](https://www.npmjs.com/package/npm-cli-path)
[](https://travis-ci.com/shinnn/npm-cli-path)
[](https://codecov.io/gh/shinnn/npm-cli-path)Resolve the path of [`npm-cli.js`][npm-cli] included in the globally installed [npm](https://www.npmjs.com/) CLI
```javascript
const npmCliPath = require('npm-cli-path');(async () => {
const path = npmCliPath(); //=> '/usr/local/lib/node_modules/npm/bin/npm-cli.js'
})();
```## Installation
[Use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/about-npm/).
```
npm install npm-cli-path
```## API
```javascript
const npmCliPath = require('npm-cli-path');
```### npmCliPath()
Return: `Promise`
It resolves the path of [`npm-cli.js`][npm-cli] which is the entry point of [npm CLI](https://github.com/npm/cli).
## License
[ISC License](./LICENSE) © 2017 - 2019 Watanabe Shinnosuke
[npm-cli]: https://github.com/npm/cli/blob/latest/bin/npm-cli.js