npm-cli-path

Resolve the path of `npm-cli.js` included in the globally installed npm CLI


Keywords
npm, npm-cli, cli, path, bin, entry, entry-point, file, find, pinpoint, resolve, promise, promises, then, async, asynchronous, asynchronously
License
ISC
Install
npm install npm-cli-path@4.0.0

Documentation

npm-cli-path

npm version Build Status codecov

Resolve the path of npm-cli.js included in the globally installed npm CLI

const npmCliPath = require('npm-cli-path');

(async () => {
  const path = npmCliPath(); //=> '/usr/local/lib/node_modules/npm/bin/npm-cli.js'
})();

Installation

Use npm.

npm install npm-cli-path

API

const npmCliPath = require('npm-cli-path');

npmCliPath()

Return: Promise<string>

It resolves the path of npm-cli.js which is the entry point of npm CLI.

License

ISC License © 2017 - 2019 Watanabe Shinnosuke