aboutsummaryrefslogtreecommitdiff
path: root/xtask/src/path.rs
blob: 6f4545c274aa87ab98cdd17a96a41ad54edf086b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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/")
}

pub fn ts_queries() -> PathBuf {
    project_root().join("runtime/queries")
}

pub fn lang_config() -> PathBuf {
    project_root().join("languages.toml")
}

pub fn themes() -> PathBuf {
    project_root().join("runtime/themes")
}