4.0.0 • Published 5 years ago

npm-cli-path v4.0.0

Weekly downloads
1,242
License
ISC
Repository
github
Last release
5 years ago

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