mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-04-11 06:36:05 +00:00
Create out_dir (usually "pkg") if it does not exist
This commit is contained in:
parent
eaaf3461bd
commit
2a2581188a
@ -350,6 +350,7 @@ impl Bindgen {
|
|||||||
} else {
|
} else {
|
||||||
"js"
|
"js"
|
||||||
};
|
};
|
||||||
|
fs::create_dir_all(out_dir)?;
|
||||||
let js_path = out_dir.join(stem).with_extension(extension);
|
let js_path = out_dir.join(stem).with_extension(extension);
|
||||||
fs::write(&js_path, reset_indentation(&js))
|
fs::write(&js_path, reset_indentation(&js))
|
||||||
.with_context(|_| format!("failed to write `{}`", js_path.display()))?;
|
.with_context(|_| format!("failed to write `{}`", js_path.display()))?;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user