Plugin Development
Publishing Guide
How to publish and share your Volt plugins
Publishing Your Plugin
Learn how to publish and share your Volt plugins with the community.
Prerequisites
Before publishing, ensure your plugin:
- ✅ Has a unique ID
- ✅ Includes proper documentation
- ✅ Follows best practices
- ✅ Has been thoroughly tested
- ✅ Includes a README with usage instructions
Plugin Package Structure
my-awesome-plugin/
├── package.json # NPM package configuration
├── README.md # Plugin documentation
├── LICENSE # License file
├── src/
│ ├── index.ts # Main plugin file
│ ├── types.ts # Type definitions
│ └── components/ # React components
├── dist/ # Compiled output
└── examples/ # Usage examplesPackage.json Configuration
{
"name": "@volt-plugins/my-awesome-plugin",
"version": "1.0.0",
"description": "An awesome plugin for Volt",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"keywords": ["volt", "plugin", "launcher"],
"author": "Your Name",
"license": "MIT",
"peerDependencies": {
"react": "^19.0.0",
"@tauri-apps/api": "^2.0.0"
},
"devDependencies": {
"typescript": "^5.0.0",
"@types/react": "^19.0.0"
},
"volt": {
"pluginType": "frontend",
"requiredVersion": ">=1.0.0"
}
}Build Your Plugin
TypeScript Configuration
Create a tsconfig.json:
{
"compilerOptions": {
"target": "ES2020",
"module": "ESNext",
"lib": ["ES2020", "DOM"],
"jsx": "react",
"declaration": true,
"outDir": "./dist",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"moduleResolution": "node"
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}Build Script
Add build script to package.json:
{
"scripts": {
"build": "tsc",
"prepublishOnly": "npm run build"
}
}Documentation
README Template
# My Awesome Plugin
> An awesome plugin for Volt that does amazing things
## Installation
```bash
npm install @volt-plugins/my-awesome-plugin
```
## Usage
```typescript
import MyAwesomePlugin from "@volt-plugins/my-awesome-plugin";
// Register the plugin
registerPlugin(new MyAwesomePlugin());
```
## Configuration
| Option | Type | Default | Description |
| --------- | --------- | ------- | ------------------------- |
| `enabled` | `boolean` | `true` | Enable/disable the plugin |
| `apiKey` | `string` | `''` | Your API key |
## Examples
### Basic Usage
```typescript
const plugin = new MyAwesomePlugin({
apiKey: "your-api-key",
});
```
## Features
- ⚡ Lightning fast
- 🎨 Beautiful UI
- 🔧 Highly customizable
- 📦 Zero dependencies
## License
MIT © Your NamePublishing to NPM
Step 1: Create an NPM Account
Create an account at npmjs.com
Step 2: Login
npm loginStep 3: Publish
npm publish --access publicPublishing to GitHub
Step 1: Create Repository
Create a new repository on GitHub for your plugin.
Step 2: Add GitHub Actions
Create .github/workflows/publish.yml:
name: Publish Package
on:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "20"
registry-url: "https://registry.npmjs.org"
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Publish to NPM
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}Step 3: Create Release
git tag v1.0.0
git push origin v1.0.0Then create a release on GitHub.
Plugin Registry
Submit your plugin to the official Volt Plugin Registry:
- Fork the Volt Plugin Registry
- Add your plugin to
plugins.json:
{
"id": "my-awesome-plugin",
"name": "My Awesome Plugin",
"description": "An awesome plugin for Volt",
"author": "Your Name",
"version": "1.0.0",
"repository": "https://github.com/yourusername/my-awesome-plugin",
"npm": "@volt-plugins/my-awesome-plugin",
"category": "productivity",
"tags": ["search", "utility"],
"verified": false
}- Create a pull request
Versioning
Follow Semantic Versioning:
- MAJOR version: Breaking changes
- MINOR version: New features (backwards compatible)
- PATCH version: Bug fixes
# Patch release (1.0.0 → 1.0.1)
npm version patch
# Minor release (1.0.0 → 1.1.0)
npm version minor
# Major release (1.0.0 → 2.0.0)
npm version majorTesting Before Publishing
Test your plugin locally:
# In your plugin directory
npm link
# In Volt's directory
npm link @volt-plugins/my-awesome-pluginMaintenance
Update Dependencies
Keep your dependencies up to date:
npm outdated
npm updateSecurity
Run security audits:
npm audit
npm audit fixDeprecation
If you need to deprecate a version:
npm deprecate @volt-plugins/my-awesome-plugin@1.0.0 "Version 1.0.0 is deprecated, please upgrade to 2.0.0"Community Guidelines
- Be responsive to issues and pull requests
- Keep your README up to date
- Add CHANGELOG.md to track changes
- Include tests when possible
- Follow the Code of Conduct
Support
Ready to publish? Make sure to check the Best Practices guide first!