mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-11-28 12:27:16 +03:00
parent
77e48ab7db
commit
596fa08d48
6
.changes/default-ignore-file.md
Normal file
6
.changes/default-ignore-file.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
"cli.rs": patch
|
||||
"cli.js": patch
|
||||
---
|
||||
|
||||
Automatically use any `.taurignore` file as ignore rules for dev watcher and app path finder.
|
3
examples/api/.taurignore
Normal file
3
examples/api/.taurignore
Normal file
@ -0,0 +1,3 @@
|
||||
src-tauri/locales/
|
||||
src-tauri/Cross.toml
|
||||
src-tauri/.gitignore
|
@ -26,6 +26,7 @@ fn lookup<F: Fn(&PathBuf, FileType) -> bool>(dir: &Path, checker: F) -> Option<P
|
||||
}
|
||||
|
||||
let mut builder = WalkBuilder::new(dir);
|
||||
builder.add_custom_ignore_filename(".taurignore");
|
||||
let _ = builder.add_ignore(default_gitignore);
|
||||
builder
|
||||
.require_git(false)
|
||||
|
@ -235,6 +235,7 @@ fn lookup<F: FnMut(FileType, PathBuf)>(dir: &Path, mut f: F) {
|
||||
}
|
||||
|
||||
let mut builder = ignore::WalkBuilder::new(dir);
|
||||
builder.add_custom_ignore_filename(".taurignore");
|
||||
let _ = builder.add_ignore(default_gitignore);
|
||||
if let Ok(ignore_file) = std::env::var("TAURI_DEV_WATCHER_IGNORE_FILE") {
|
||||
builder.add_ignore(ignore_file);
|
||||
|
Loading…
Reference in New Issue
Block a user