Skip to main content

euv_cli/
lib.rs

1//! euv-cli
2//!
3//! The official CLI tool for the euv UI framework,
4//! providing run/build/fmt modes with hot reload and
5//! wasm-pack integration.
6
7mod build;
8mod error;
9mod fmt;
10mod hmr;
11mod logger;
12mod mode;
13mod server;
14
15#[cfg(test)]
16#[path = "../tests/mod.rs"]
17mod tests;
18
19pub use std::{
20    env::{current_dir, var},
21    // hyperlane exports an async ; the std one is synchronous and
22    // returns its Result directly, so the bare name would silently change which
23    // function this crate calls.
24    error::Error,
25    ffi::OsStr,
26    fmt::{Display, Formatter},
27    fs::{canonicalize as sync_canonicalize, read_to_string as sync_read_to_string},
28    iter::once,
29    mem::take,
30    string::FromUtf8Error,
31};
32
33pub use {build::*, error::*, fmt::*, hmr::*, logger::*, mode::*, server::*};
34
35use {
36    clap::Parser,
37    color_output::*,
38    hyperlane::*,
39    ignore::gitignore::{Gitignore, GitignoreBuilder},
40    log::SetLoggerError,
41    lombok_macros::*,
42    notify::{Config, Event, RecommendedWatcher, RecursiveMode, Watcher},
43    qrcode::{QrCode, render::unicode::Dense1x2},
44    serde::Serialize,
45    std::{
46        collections::HashMap,
47        ffi,
48        fmt::Arguments,
49        fs::FileType,
50        io,
51        net::{IpAddr, Ipv4Addr},
52        path::{Component, Path, PathBuf},
53        process::{Output, Stdio},
54        slice::Iter,
55        sync::{Arc, OnceLock},
56        time::Duration,
57    },
58    tokio::{
59        fs::{
60            DirEntry, ReadDir, canonicalize, create_dir_all, metadata, read, read_dir,
61            read_to_string, remove_dir, remove_dir_all, remove_file, write,
62        },
63        process::Command,
64        spawn,
65        sync::{
66            RwLock, RwLockWriteGuard, broadcast,
67            mpsc::{Receiver, Sender, channel},
68        },
69        time::{Interval, interval, sleep},
70    },
71};