pkg-entry-and-bin-resolved

`main` entry and `bin` paths resolved from package.json

Usage no npm install needed!

<script type="module">
  import pkgEntryAndBinResolved from 'https://cdn.skypack.dev/pkg-entry-and-bin-resolved';
</script>

README

pkg-entry-and-bin-resolved

NPM version Unix Build Status Windows Build Status Coveralls Status Dependency Status

main entry and bin paths resolved from package.json

Install

npm install --save pkg-entry-and-bin-resolved

Usage

import pkgEntryAndBinResolved from 'pkg-entry-and-bin-resolved';

pkgEntryAndBinResolvedAsync('./fixtures/basic.json')
  .then(result => console.log(result)); /* [
    '/Users/iamstarkov/projects/pkg-entry-and-bin-resolved/fixtures/src/index.js',
    '/Users/iamstarkov/projects/pkg-entry-and-bin-resolved/fixtures/one.js',
    '/Users/iamstarkov/projects/pkg-entry-and-bin-resolved/fixtures/two.js' ] */

API

pkgEntryAndBinResolved(pkg)

Return a promise that resolves flat array of main entry and binaries resolved.

pkg

Required
Type: String

Path to package.json.

License

MIT © Vladimir Starkov