cargo-leptos 0.1.8

Build tool for Leptos.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use cargo_leptos::{config::Cli, ext::anyhow::Result, run};
use clap::Parser;
use std::env;

#[tokio::main]
async fn main() -> Result<()> {
    let mut args: Vec<String> = env::args().collect();
    // when running as cargo leptos, the second argument is "leptos" which
    // clap doesn't expect
    if args.get(1).map(|a| a == "leptos").unwrap_or(false) {
        args.remove(1);
    }

    let args = Cli::parse_from(&args);
    crate::run(args).await
}