pubware
v1.0.0-alpha.4
Published
Agnostic & extensible package publisher
Maintainers
Readme
Table of Contents
Overview
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.
🔥 Features
- 💡 Intuitive DX
- 🏗️ Built with type-safety
- 🚀 Performant and minimal
- 🤯 Headless support (run in CI)
- 🏃 Dry runs for testing
- 🔌 Extensible functionality
- 🔄 Lifecycle hooks
Requirements
- Node 18+
Installation
Install pubware as a dev dependency:
npm install -D pubwareAdd the publish script to package.json:
"scripts": {
"publish": "pubware"
}Usage
Run the command:
npm run publishOr with npx:
npx pubwareArgs
--dry-run
Pass the --dry-run arg to run and report on what changes would have happened:
npm run publish --dry-run--headless
Pass the --headless arg to run without an interface (CI support):
npm run publish --headlessConfiguration
Configuration 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
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.
Internal
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.
External
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": {}
}
}Creating Plugins
Plugins support various utility methods and lifecycle hooks that make it easy to integrate with pubware.
Learn more about creating plugins.
Development
Install the modules:
pnpm installCreate a build:
pnpm buildLink the build to your global node_modules:
pnpm link .Run the build:
pnpm pubwareLicense
MIT
