Essential steps to complete before committing and publishing your plugin
.gitignore
file with the following minimum configuration:
.npmignore
file to ensure only necessary files are included in the npm package:
LICENSE
file in the root directory with the following content:
package.json
file contains all required fields:
name
: Package name (should match npm registry requirements)version
: Semantic version (e.g., “1.0.0”)description
: Clear description of the pluginmain
: Entry point (typically “dist/index.js”)types
: TypeScript definitions (typically “dist/index.d.ts”)author
: Author informationlicense
: “MIT”repository
: Git repository informationkeywords
: Relevant keywords for npm searchscripts
: Build, test, and other necessary scriptsdependencies
: All runtime dependenciesdevDependencies
: All development dependenciespeerDependencies
: If applicable (e.g., “@elizaos/core”)type
: Should be “module” for ESM modulesmodule
: Same as main for ESM (typically “dist/index.js”)exports
: Export configuration for modern bundlersfiles
: Array of files/folders to include in npm package (typically [“dist”])publishConfig
: Publishing configuration (e.g., {"access": "public"}
)agentConfig
section:
type
: Data type (“string”, “number”, “boolean”, etc.)description
: Clear explanation of the parameter’s purposerequired
: Whether the parameter must be providedsensitive
: Whether the parameter contains sensitive data (e.g., API keys)default
: Optional default value if not requiredbun run build
to ensure the project builds successfully.gitignore
prevents unnecessary files from being committed to the repository.npmignore
ensures only essential files are published to npm.github/workflows/npm-deploy.yml
NPM_TOKEN
.prettierrc
file in the root directory: