Debian Codegraph @

xtask/src/path.rs

raw symbols SCIP
1 use std::path::{Path, PathBuf};
2
3 pub fn project_root() -> PathBuf {
4 Path::new(env!("CARGO_MANIFEST_DIR"))
5 .parent()
6 .unwrap()
7 .to_path_buf()
8 }
9
10 pub fn book_gen() -> PathBuf {
11 project_root().join("book/src/generated/")
12 }
13
14 pub fn runtime() -> PathBuf {
15 project_root().join("runtime")
16 }
17
18 pub fn ts_queries() -> PathBuf {
19 runtime().join("queries")
20 }
21
22 pub fn themes() -> PathBuf {
23 runtime().join("themes")
24 }
25
26 pub fn tests_indent() -> PathBuf {
27 project_root().join("tests").join("indent")
28 }
29
30 pub fn tests_highlight() -> PathBuf {
31 project_root()
32 .join("tests")
33 .join("query")
34 .join("highlights")
35 }