publish-police
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

publish-police

Check npm package dist before publish (yep, I always forgot to build before publish)

npm GitHub

install

pnpm i publish-police -D

features

{
  "files": ["<pattern>"],
  "exports": {
    // ...exports
  },
}
  1. Check files fields in package.json is exit on disk.
  2. Check file listed in exports fields in package.json is exit on disk.

options

strict - default true, e.g. publish-police --strict=false

throw error if files not present or empty in package.json.

usage

set it in prepublishOnly script

{
  "prepublishOnly": "publish-police",
}

or exec manually before publish...

{
  "ci:publish": "pnpm run build && publish-police && pnpm changeset publish",
}

Readme

Keywords

Package Sidebar

Install

npm i publish-police

Weekly Downloads

36

Version

0.2.1

License

MIT

Unpacked Size

110 kB

Total Files

13

Last publish

Collaborators

  • qidanta