@pnpm/local-resolver
v12.0.9
Published
Resolver for local packages
Downloads
1,702
Readme
@pnpm/local-resolver
Resolver for local packages
Installation
pnpm add @pnpm/local-resolver
Usage
'use strict'
const resolveFromLocal = require('@pnpm/local-resolver').default
resolveFromLocal({pref: './example-package'}, {prefix: process.cwd()})
.then(resolveResult => console.log(resolveResult))
//> { id: 'link:example-package',
// normalizedPref: 'link:example-package',
// package:
// { name: 'foo',
// version: '1.0.0',
// readme: '# foo\n',
// readmeFilename: 'README.md',
// description: '',
// _id: '[email protected]' },
// resolution: { directory: 'example-package', type: 'directory' }
// resolvedVia: 'local-filesystem' }
License
MIT