Package Exports
- sb-npm-path
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (sb-npm-path) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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-pathAPI
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