WooziePlugins
CometUI Community Plugins
How to install, use, create, and publish community component packages through CometUI.
CometUI — Community Plugins
CometUI is the package system for sharing Woozie components. You can install packages other people have published, or publish your own.
Installing a package
woozie add coolcardsThis pulls comet-coolcards from npm and drops it into comet_modules/ in your project:
my-project/
comet_modules/
coolcards/
coolcards.woozie
comet.jsonUsing installed components
After installing, use components with the comet: prefix:
app:
section:
heading "Pricing"
grid [cols=3]:
comet:coolcards:pricing_card "Starter" [price=$9/mo, features=5 Projects;1GB Storage;Email Support]
comet:coolcards:pricing_card "Pro" [price=$29/mo, features=Unlimited Projects;10GB Storage;Priority Support]The pattern is:
comet:<package>:<component> "args" [attributes]package— the installed package namecomponent— which component to use from that package- Arguments and attributes work exactly like built-in components
Creating your own package
1. Scaffold it
mkdir my-buttons
cd my-buttons
woozie comet initYou get:
my-buttons/
my-buttons.woozie -- your components
comet.json -- package metadata
package.json -- npm package config2. Write components
// my-buttons.woozie
@component fancy_button:
button "{text}" [variant=solid, color={color}]
@component icon_button:
button "{icon} {text}" [variant=outline]3. Set up comet.json
{
"name": "my-buttons",
"version": "1.0.0",
"description": "Fancy button components for Woozie",
"components": ["fancy_button", "icon_button"],
"author": "your-name"
}4. Publish
woozie publishThis publishes as comet-my-buttons on npm. Anyone can install it with:
woozie add my-buttonsInstalling from a local folder
If you have a package locally (not on npm yet), pass the path:
woozie add ./path/to/my-buttonsWoozie figures out whether it's a local path or an npm package name automatically.
Managing packages
# see what's installed
woozie comet list
# remove one
woozie comet remove coolcardsFinding packages
Search npm for packages with the comet- prefix:
npm search comet-