Pubware is an agnostic and extensible package publisher. Pubware supports any npm, yarn, pnpm project, or other publishing processes (Python packages, Ruby gems, etc.) with a Node runtime. Additionally, functionality can be extended with community-made plugins. Pubware can be customized to any publishing requirements.
- 💡 Intuitive DX
- 🏗️ Built with type-safety
- 🚀 Performant and minimal
- 🤯 Headless support (run in CI)
- 🏃 Dry runs for testing
- 🔌 Extensible functionality
- 🔄 Lifecycle hooks
- Node 18+
Install pubware as a dev dependency:
npm install -D pubwareAdd the publish script to package.json:
"scripts": {
"publish": "pubware"
}Run the command:
npm run publishOr with npx:
npx pubwarePass the --dry-run arg to run and report on what changes would have happened:
npm run publish --dry-runPass the --headless arg to run without an interface (CI support):
npm run publish --headlessConfiguration is supported with a pubware.json file or within package.json. You can pass values to plugins based on plugin-specific parameters.
{
"pubware": {
"plugins": {
"internal": {
"@pubware/npm": {},
"@pubware/git": {}
},
"external": {
"github": {},
"slack": {},
"custom-plugin": {
"key": "value"
}
}
}
}
}Plugins extend the functionality of pubware and can be configured per project. Plugins are defined in the configuration as either internal or external. The internal plugins come pre-bundled with pubware, such as the @pubware/npm and @pubware/git plugins. The external plugins represent the additional project-based plugins. All plugins are executed in the order they are defined.
The internal plugins, @pubware/npm and @pubware/git, have a unique disabled attribute, as well as their original configuration:
{
"internal": {
"@pubware/npm": {
"disabled": false
},
"@pubware/git": {
"disabled": false
}
}
}Learn more about the @pubware/npm and @pubware/git plugins.
The external plugins can be used for any additional functionality:
{
"external": {
"gitlab": {},
"discord": {},
"doordash": {}
}
}Important
A plugin must match the dependency import name when referencing from node_modules
Local plugins are also supported:
{
"external": {
"./plugin.js": {}
}
}Plugins support various utility methods and lifecycle hooks that make it easy to integrate with pubware.
Learn more about creating plugins.
Install the modules:
pnpm installCreate a build:
pnpm buildLink the build to your global node_modules:
pnpm link .Run the build:
pnpm pubwareMIT
