mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-30 02:38:11 +08:00
Make the cargo-run tool auto-install its wasm-opt build dependency (#4256)
* Allow auto downloading wasm-opt * Fix for mac * Review
This commit is contained in:
@@ -8,7 +8,7 @@ use std::path::Path;
|
||||
use std::process::ExitCode;
|
||||
use std::time::Duration;
|
||||
|
||||
const EXCLUDED_DIRECTORIES: &[&str] = &["target", ".git", "frontend/node_modules", "frontend/dist", "frontend/wrapper/pkg"];
|
||||
const EXCLUDED_DIRECTORIES: &[&str] = &["target", ".git", "frontend/node_modules", "frontend/dist", "frontend/wrapper/pkg", "tools"];
|
||||
const INCLUDED_EXTENSIONS: &[&str] = &["rs"];
|
||||
|
||||
const DEBOUNCE: Duration = Duration::from_millis(500);
|
||||
@@ -23,17 +23,16 @@ fn main() -> ExitCode {
|
||||
return ExitCode::FAILURE;
|
||||
}
|
||||
};
|
||||
println!("Watching for changes...");
|
||||
loop {
|
||||
std::thread::park();
|
||||
}
|
||||
}
|
||||
|
||||
pub struct WatchGuard {
|
||||
struct WatchGuard {
|
||||
_debouncer: Debouncer<RecommendedWatcher, RecommendedCache>,
|
||||
}
|
||||
|
||||
pub fn watch(steps: impl IntoIterator<Item = Expression>) -> Result<WatchGuard, Error> {
|
||||
fn watch(steps: impl IntoIterator<Item = Expression>) -> Result<WatchGuard, Error> {
|
||||
let steps: Vec<Expression> = steps.into_iter().collect();
|
||||
let root = std::env::current_dir()
|
||||
.and_then(|p| p.canonicalize())
|
||||
|
||||
Reference in New Issue
Block a user