1.0.4 • Published 7 months ago

add-pkg-exports v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

add-pkg-exports

This is a command line tool to populate the exports field in a package.json from a glob of files.

npx add-pkg-exports
Usage: add-pkg-exports <glob-pattern>
Description: Add exports field to package.json based on the files found by the glob pattern

Example

➜  dist git:(main) ✗ tree
.
├── bin.cjs
├── bin.d.cts
├── bin.d.ts
└── bin.js
npx add-pkg-exports ./dist/* # unix glob
# npx add-pkg-exports "./dist/*" # uses node's glob

Adds exports to package.json:

{
  "./bin": {
    "require": "./dist/bin.cjs",
    "import": "./dist/bin.js"
  }
}
1.0.4

7 months ago

1.0.3

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago

1.0.0-Pre.0

7 months ago