This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@abraham/pkg-ok
TypeScript icon, indicating that this package has built-in type declarations

3.0.0-next.2 • Public • Published

pkg-ok Build status npm

pkg-ok checks paths and scripts defined in package.json before you publish 👌

  • Ensures paths defined in main, bin, module, types, typings, es2015 and browser exist
  • Ensures bin scripts use cross-platform line endings

This is a modernized fork of typicode/pkg-ok.

Usage

npm install @abraham/pkg-ok --save-dev
// package.json
{
  "main": "oops_this_file_doesnt_exist.js",
  "scripts": {
    "prepublishOnly": "... && pkg-ok"
  }
}
npm publish
# Error!
# Since main file doesn't exist, publish is blocked

Options

pkg-ok can be configured to check additional package.json fields or bin files

pkg-ok --field someField --bin script.sh

API

const pkgDirectory = __dirname;

pkgOk(pkgDirectory, {
  fields: ['someAdditonalField'],
  bin: ['someAdditionalScript.sh'],
});

License

MIT

/@abraham/pkg-ok/

    Package Sidebar

    Install

    npm i @abraham/pkg-ok

    Weekly Downloads

    0

    Version

    3.0.0-next.2

    License

    MIT

    Unpacked Size

    14.5 kB

    Total Files

    12

    Last publish

    Collaborators

    • abraham