dmc-core 0.3.5

Engine, CLI, watch mode, and collection builds for the dmc MDX compiler
Documentation
use clap::{Parser, Subcommand};

use crate::cli::{build::BuildCmd, compile::CompileCmd, dev::DevCmd, init::InitCmd};

pub mod build;
pub mod compile;
pub mod dev;
pub mod init;

#[derive(Parser)]
#[command(name = "dmc `dmc`", version, about = "Rust MDX compiler")]
pub struct Cli {
  #[command(subcommand)]
  pub cmd: Cmd,
}

#[derive(Subcommand)]
pub enum Cmd {
  /// Build all collections from dmc.toml.
  Build(BuildCmd),
  /// Scaffold a default dmc.toml in the current directory.
  Init(InitCmd),
  /// Compile a single MDX file and print JSON to stdout.
  Compile(CompileCmd),
  /// Watch the content roots and rebuild on change.
  Dev(DevCmd),
}