delete-publishconfig-directory
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Delete publishConfig Directory

Delete publishConfig Directory is a tool for use in conjunction with Changesets and Clean Publish.

When using the two of them together, Clean Publish doesn't delete the directory field from the publishConfig field in your package's package.json. This causes Changesets to try and navigate two directories down from the root of your package, causing a failure to publish.

Delete publishConfig Directory prevents this by deleting the extra field from your cleaned package.json.

Install

Install it via your NodeJS package manager of choice:

$ pnpm install -D delete-publishconfig-directory

Usage

Following the recipe from Clean Publish's Usage with pnpm workspaces, update your package.json to include:

{
  "publishConfig": {
    "directory": "package"
  },
  "scripts": {
    "prepublishOnly": "rm -rf ./package && clean-publish && delete-publishconfig-directory",
    "postpublish": "rm -rf ./package"
  }
}

📝 License

Copyright © 2023 Richard Harrah.
This project is MIT licensed.

Package Sidebar

Install

npm i delete-publishconfig-directory

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

37.7 kB

Total Files

10

Last publish

Collaborators

  • topplethenun