npm-cli-path
v4.0.0
Published
Resolve the path of `npm-cli.js` included in the globally installed npm CLI
Downloads
2,221
Maintainers
Readme
npm-cli-path
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
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