Clean up package.json from previous runs

Else wasm-pack crashes trying to read its own (old) file
master
main() 3 years ago committed by main()
parent 4ae6306570
commit 11ef667f6f
  1. 1
      src/command/utils.rs

@ -37,6 +37,7 @@ fn find_manifest_from_cwd() -> Result<PathBuf, failure::Error> {
/// Construct our `pkg` directory in the crate.
pub fn create_pkg_dir(out_dir: &Path) -> Result<(), failure::Error> {
let _ = fs::remove_file(out_dir.join("package.json")); // Clean up package.json from previous runs
fs::create_dir_all(&out_dir)?;
fs::write(out_dir.join(".gitignore"), "*")?;
Ok(())

Loading…
Cancel
Save