npm.io
4.0.0 • Published 7 years ago

npm-cli-path

Licence
ISC
Version
4.0.0
Deps
3
Size
4 kB
Vulns
0
Weekly
0
Stars
2

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

Keywords