mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-04-22 12:42:14 +00:00
Merge pull request #1330 from Vlad-Shcherbina/mkdir_pkg
Create --out_dir (usually "pkg") if it does not exist
This commit is contained in:
commit
f00c74aeb0
@ -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