Crate fob_cli

Crate fob_cli 

Source
Expand description

Fob CLI - Modern JavaScript bundler with Rust performance.

This crate provides the command-line interface for the Fob bundler, exposing all functionality from fob-bundler through an intuitive CLI with excellent error messages and user experience.

§Architecture

The CLI is organized into several key modules:

  • error - Comprehensive error types with actionable messages
  • logger - Structured logging with tracing
  • ui - Terminal UI utilities for progress bars and formatted output
  • commands - Individual CLI command implementations
  • config - Configuration file handling
  • server - Development server

§Features

  • Type-safe error handling: Uses thiserror for structured errors
  • Structured logging: Built on tracing for better debugging
  • Beautiful terminal UI: Progress bars, colors, and formatting
  • File watching: Automatic rebuilds on file changes
  • Configuration profiles: Environment-specific settings

§Example

use fob_cli::{error::Result, logger};

fn main() -> Result<()> {
    logger::init_logger(false, false, false);
    // CLI command implementations...
    Ok(())
}

Re-exports§

pub use error::BuildError;
pub use error::CliError;
pub use error::ConfigError;
pub use error::Result;
pub use error::ResultExt;

Modules§

cli
Command-line interface definition for Fob bundler.
commands
Command implementations for the Joy CLI.
config
Configuration system for Fob bundler with multi-source loading.
dev
Development server module.
error
Comprehensive error handling for the Joy CLI.
logger
Logging infrastructure for the Joy CLI.
ui
Terminal UI utilities for progress bars and formatted output.