3.0.0 • Published 5 years ago

sb-npm-path v3.0.0

Weekly downloads
8,133
License
MIT
Repository
github
Last release
5 years ago

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

3.0.0

5 years ago

2.0.0

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago