broccoli_cli/commands/plugin/mod.rs
1pub mod build;
2pub mod new;
3mod wasm;
4pub mod watch;
5
6use clap::{Args, Subcommand};
7
8use self::build::BuildPluginArgs;
9use self::new::NewPluginArgs;
10use self::watch::WatchPluginArgs;
11
12#[derive(Args)]
13pub struct PluginArgs {
14 #[command(subcommand)]
15 pub command: PluginCommand,
16}
17
18#[derive(Subcommand)]
19pub enum PluginCommand {
20 /// Create a new plugin from template
21 New(NewPluginArgs),
22 /// Build a plugin's backend and/or frontend components.
23 ///
24 /// Customize the frontend build via `broccoli.dev.toml` in the
25 /// plugin directory. See `broccoli plugin build --help` for details.
26 Build(BuildPluginArgs),
27 /// Watch a plugin for changes, auto-build and upload.
28 ///
29 /// Watches plugin source files and automatically rebuilds, packages,
30 /// and uploads the plugin to the server on each change.
31 ///
32 /// Place a `broccoli.dev.toml` in the plugin directory to customize
33 /// watch behavior, frontend directory, and build commands. Run
34 /// `broccoli plugin watch --help` for details.
35 Watch(WatchPluginArgs),
36}