NPM
Generates a WASM from uk-areacodes-rust.
Packages up uk-areacodes-rust as a WASM package for use in webassembly runtimes such as a browser.
wasm-pack build
wasm-pack test --headless --firefox
wasm-pack publish
In js-example-use use NPM with webpack to build a sample page to use the API.
cd js-example-use
npm install
npm run build
Examine the dist directory. To spin up a test dev server to serve the file
npx webpack serve
and open http://localhost:8080
You can see it running at http://blog.ewanharrow.com/uk-areacodes-wasm/