wasm-tool / parcel-plugin-wasm.rs

wasm-bindgen support for Parcel bundler
MIT License
66 stars 16 forks source link

use wasm-pack build instead of init #4

Closed danieledapo closed 6 years ago

danieledapo commented 6 years ago

resolves #2

danieledapo commented 6 years ago

@catsigma I think this pr should be ready to go, is there anything wrong?

catsigma commented 6 years ago

I’m so sorry that I just noticed this PR. GitHub didn’t send me the notification of this.

Could you add a fall back if ‘wasm-pack’ is older than 0.5 version?

danieledapo commented 6 years ago

@catsigma I've added a commit that uses wasm-pack init if wasm-pack build if not available. I didn't check the version of wasm-pack because version comparison is tricky and I don't think adding a dependency would be worth it. Instead, I check if wasm-pack has a build command and if so use that, init otherwise.