aboutsummaryrefslogtreecommitdiff
path: root/xtask/src/path.rs
diff options
context:
space:
mode:
Diffstat (limited to 'xtask/src/path.rs')
-rw-r--r--xtask/src/path.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/xtask/src/path.rs b/xtask/src/path.rs
new file mode 100644
index 00000000..6f4545c2
--- /dev/null
+++ b/xtask/src/path.rs
@@ -0,0 +1,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")
+}