Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 26 days 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 (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2019-05-31T01:49:46.000Z (over 5 years ago)
- Last Synced: 2024-09-19T23:17:54.767Z (about 2 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
[![npm version](https://img.shields.io/npm/v/npm-cli-path.svg)](https://www.npmjs.com/package/npm-cli-path)
[![Build Status](https://travis-ci.com/shinnn/npm-cli-path.svg?branch=master)](https://travis-ci.com/shinnn/npm-cli-path)
[![codecov](https://codecov.io/gh/shinnn/npm-cli-path/branch/master/graph/badge.svg)](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