4.0.0 • Published 6 years ago
npm-cli-path v4.0.0
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-pathAPI
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