2022-09-19 21:38:20 +08:00
|
|
|
use std::path::{Path, PathBuf};
|
|
|
|
|
|
|
|
pub fn project_root() -> PathBuf {
|
|
|
|
Path::new(env!("CARGO_MANIFEST_DIR"))
|
|
|
|
.parent()
|
|
|
|
.unwrap()
|
|
|
|
.to_path_buf()
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn book_gen() -> PathBuf {
|
|
|
|
project_root().join("book/src/generated/")
|
|
|
|
}
|
|
|
|
|
2024-09-28 19:52:09 +08:00
|
|
|
pub fn runtime() -> PathBuf {
|
|
|
|
project_root().join("runtime")
|
|
|
|
}
|
|
|
|
|
2022-09-19 21:38:20 +08:00
|
|
|
pub fn ts_queries() -> PathBuf {
|
2024-09-28 19:52:09 +08:00
|
|
|
runtime().join("queries")
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn themes() -> PathBuf {
|
|
|
|
runtime().join("themes")
|
2022-09-19 21:38:20 +08:00
|
|
|
}
|