@object-ui/create-plugin
v4.0.7
Published
CLI tool to scaffold ObjectUI plugins
Maintainers
Readme
@object-ui/create-plugin
CLI tool to quickly scaffold new ObjectUI plugins with best practices.
Usage
# Using pnpm
pnpm create @object-ui/plugin my-plugin
# Using npm
npm create @object-ui/plugin my-plugin
# Using npx
npx @object-ui/create-plugin my-pluginWhat Gets Generated
The tool creates a complete plugin package structure:
packages/plugin-my-plugin/
├── src/
│ ├── index.tsx # Plugin export & registration
│ ├── MyPluginImpl.tsx # Component implementation
│ ├── MyPluginImpl.test.tsx # Tests
│ └── types.ts # Schema definitions
├── package.json
├── tsconfig.json
├── vite.config.ts
└── README.mdFeatures
- ✅ TypeScript support out of the box
- ✅ Vite build configuration
- ✅ Component registration with ComponentRegistry
- ✅ Test setup with Vitest
- ✅ Proper package.json with workspace dependencies
- ✅ README template
- ✅ Type definitions
Interactive Mode
Run without arguments for interactive prompts:
pnpm create @object-ui/pluginYou'll be prompted for:
- Plugin name
- Description
- Author name
Options
pnpm create @object-ui/plugin my-plugin --description "My awesome plugin" --author "Your Name"After Creation
Navigate to the plugin directory:
cd packages/plugin-my-pluginInstall dependencies:
pnpm installBuild the plugin:
pnpm buildRun tests:
pnpm test
Compatibility
- Node.js: ≥ 18
- TypeScript: ≥ 5.0 (strict mode)
@objectstack/spec: ^3.3.0@objectstack/client: ^3.3.0- Tailwind CSS: ≥ 3.4 (for packages with UI)
Links
License
MIT — see LICENSE.
