Adding a New Plugin
-
Create the plugin directory:
mkdir -p plugins/my-new-plugin cd plugins/my-new-plugin -
Initialize
package.json:{ "name": "@opencenter/headlamp-plugin-my-new-plugin", "version": "1.0.0", "main": "dist/main.js", "scripts": { "dev": "webpack --mode development --watch", "build": "webpack --mode production", "test": "jest", "lint": "eslint src --ext .ts,.tsx" }, "peerDependencies": { "@kinvolk/headlamp-plugin": "^0.13.0", "react": "^18.0.0", "react-dom": "^18.0.0" } } -
Create the source structure:
mkdir -p src __tests__ assets touch src/index.tsx -
The plugin is automatically included in workspace commands.