Skip to main content
Version: Latest - 0.0.1

Publishers

Publisher plugins run after git push during the version command. Use them to publish your package to a registry or any other distribution channel.

Built-in Publishers

PluginDescription
createNpmPublisherPublish to the npm registry

Custom Publishers

You can write your own publisher by implementing the PublisherPlugin type:

import type { PublisherPlugin } from "cngpac";

const myPublisher: PublisherPlugin = async ({ pkgJsonPath, versionBump }) => {
// ...publish logic...
};

A publisher receives:

PropertyTypeDescription
pkgJsonPathPkgFileAbsPathAbsolute path to package.json
versionBumpVersionBumpVersion bump information

Register it in your config:

export default defineConfig({
// ...
publishers: [myPublisher],
});