fix(cli): correct resource paths
This commit is contained in:
parent
10f5a42fd7
commit
1c640ac2c3
2 changed files with 5 additions and 5 deletions
|
|
@ -52,9 +52,9 @@ fn main() {
|
|||
|
||||
fn web_playground_files_present() -> bool {
|
||||
let paths = [
|
||||
"../docs/src/assets/js/playground.js",
|
||||
"../lib/binding_web/web-tree-sitter.js",
|
||||
"../lib/binding_web/web-tree-sitter.wasm",
|
||||
"../../docs/src/assets/js/playground.js",
|
||||
"../../lib/binding_web/web-tree-sitter.js",
|
||||
"../../lib/binding_web/web-tree-sitter.wasm",
|
||||
];
|
||||
|
||||
paths.iter().all(|p| Path::new(p).exists())
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ macro_rules! optional_resource {
|
|||
if let Some(tree_sitter_dir) = tree_sitter_dir {
|
||||
Cow::Owned(fs::read(tree_sitter_dir.join($path)).unwrap())
|
||||
} else {
|
||||
Cow::Borrowed(include_bytes!(concat!("../../", $path)))
|
||||
Cow::Borrowed(include_bytes!(concat!("../../../", $path)))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ fn get_main_html(tree_sitter_dir: Option<&Path>) -> Cow<'static, [u8]> {
|
|||
tree_sitter_dir.map_or(
|
||||
Cow::Borrowed(include_bytes!("playground.html")),
|
||||
|tree_sitter_dir| {
|
||||
Cow::Owned(fs::read(tree_sitter_dir.join("cli/src/playground.html")).unwrap())
|
||||
Cow::Owned(fs::read(tree_sitter_dir.join("crates/cli/src/playground.html")).unwrap())
|
||||
},
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue