Make build script more precise in its paths to watch

pull/70/head
Wilfred Hughes 2021-11-26 23:18:17 +07:00
parent 05873b546b
commit c3e29ec6ad
1 changed files with 6 additions and 4 deletions

@ -47,10 +47,6 @@ impl TreeSitterParser {
}
fn main() {
// Only rerun if files in the vendor/ directory change.
// TODO: use specific source directories instead.
println!("cargo:rerun-if-changed=vendor");
let parsers = vec![
TreeSitterParser {
name: "tree-sitter-bash".into(),
@ -159,5 +155,11 @@ fn main() {
},
];
// Only rerun if relevant files in the vendor/ directory change.
println!("cargo:rerun-if-changed=vendor/highlights");
for parser in &parsers {
println!("cargo:rerun-if-changed={}", parser.src_dir);
}
parsers.par_iter().for_each(|p| p.build());
}