Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ bstr = { version = "1.12.0", default-features = false, features = ["alloc", "std
bumpalo = { version = "3.17.0", features = ["allocator-api2"] }
bytemuck = { version = "1.23.0", features = ["extern_crate_alloc", "must_cast"] }
cc = "1.2.39"
clap = "4.5.53"
color-eyre = "0.6.5"
compact_str = "0.9.0"
const_format = "0.2.34"
Expand Down
8 changes: 8 additions & 0 deletions crates/vite_path/src/absolute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ impl Hash for AbsolutePath {
}
}

impl From<&AbsolutePath> for Arc<AbsolutePath> {
fn from(path: &AbsolutePath) -> Self {
let arc: Arc<Path> = path.0.into();
let arc_raw = Arc::into_raw(arc) as *const AbsolutePath;
unsafe { Self::from_raw(arc_raw) }
}
}

impl AbsolutePath {
/// Creates a [`AbsolutePath`] if the give path is absolute.
pub fn new<P: AsRef<Path> + ?Sized>(path: &P) -> Option<&Self> {
Expand Down
19 changes: 19 additions & 0 deletions crates/vite_task_bin/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[package]
name = "vite_task_bin"
version = "0.1.0"
authors.workspace = true
edition.workspace = true
license.workspace = true
rust-version.workspace = true

[[bin]]
name = "vite"
path = "src/vite.rs"

[dependencies]
clap = { workspace = true, features = ["derive"] }
vite_str = { workspace = true }
vite_task_graph = { path = "../vite_task_graph" }

[lints]
workspace = true
19 changes: 19 additions & 0 deletions crates/vite_task_bin/src/vite.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
use clap::Parser;
use vite_str::Str;

#[derive(Parser)]
enum SubCommand {
/// Run tasks
Run {
#[clap(flatten)]
query: vite_task_graph::query::cli::CLITaskQuery,

/// Additional arguments to pass to the tasks
#[clap(last = true)]
args: Vec<Str>,
},
}

fn main() {
let _subcommand = SubCommand::parse();
}
2 changes: 2 additions & 0 deletions crates/vite_task_graph/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ rust-version.workspace = true

[dependencies]
anyhow = { workspace = true }
clap = { workspace = true, features = ["derive"] }
monostate = "1.0.2"
petgraph = { workspace = true }
serde = { workspace = true, features = ["derive"] }
Expand All @@ -24,6 +25,7 @@ copy_dir = { workspace = true }
insta = { workspace = true, features = ["glob", "json"] }
tempfile = { workspace = true }
tokio = { workspace = true, features = ["fs", "rt-multi-thread"] }
toml = { workspace = true }

[lints]
workspace = true
Loading