@dobuki/auto-publish

1.0.7 • Public • Published

auto-publish

npm version

Description

This package contains some scripts to auto-publish into npmjs. It uses "np", which does most of the work, but sometimes "np" fails due to various pre-requisites not met. This package just solves that.

  • First, it's going to auto-commit just in case there are still un-committed item.
  • It ensures the repo is "ssh", not "https://"
  • Then just executes np.

Usage

Install @dobuki/auto-publish into your package.json devDependencies.

# With bun
bun i -D @dobuki/auto-publish
# or with npm
npm i -D @dobuki/auto-publish

package.json:

{
  ...
  "devDependencies": {
    "@dobuki/auto-publish": "^1.0.5",
    ...
  },
}

Add the following entry into the scripts section:

{
  ...
  "scripts": {
    "auto-publish": "npm explore @dobuki/auto-publish -- bun run auto-publish \"$(pwd)\"",
    ...
  }
}

Then you can execute the script to publish straight into npmjs:

npm run auto-publish

Github Source

https://github.com/jacklehamster/auto-publish/

Package Sidebar

Install

npm i @dobuki/auto-publish

Weekly Downloads

2

Version

1.0.7

License

MIT

Unpacked Size

170 kB

Total Files

7

Last publish

Collaborators

  • vincentlequang