npm-cli-path

4.0.0 • Public • Published

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

Package Sidebar

Install

npm i npm-cli-path

Weekly Downloads

1,021

Version

4.0.0

License

ISC

Unpacked Size

4.32 kB

Total Files

4

Last publish

Collaborators

  • shinnn