sb-npm-path

3.0.0 • Public • Published

NPM-Path

NPM-Path is a helper node module that gives you PATH value including all the locally installed npm bins.

Installation

npm install --save sb-npm-path

API

function getPath(rootDirectory?: string): string
function getPathAsync(rootDirectory?: string): Promise<string>
function clearCache(): void
 
export default getPath
export { getPath, getPathAsync, clearCache }

Examples

import { exec } from 'sb-exec'
import npmPath from 'npm-path'
 
export default async function run() {
  const PATH = await npmPath.async(__dirname)
  return await exec('mocha', { env: { PATH } })
}

License

This project is licensed under the terms of MIT License, see the LICENSE file for more info

Readme

Keywords

none

Package Sidebar

Install

npm i sb-npm-path

Weekly Downloads

89

Version

3.0.0

License

MIT

Unpacked Size

9.94 kB

Total Files

12

Last publish

Collaborators

  • steelbrain