larian-formats-wasm
v0.5.0
Published
To use this library for `wasm`, install [`wasm-pack`](https://drager.github.io/wasm-pack/installer/) and run one of the corresponding commands based on your desired target (from the same directory this README is located in):
Readme
Building for wasm
To use this library for wasm, install wasm-pack and run one of the corresponding commands based on your desired target (from the same directory this README is located in):
wasm-pack build --target web
wasm-pack build --target nodejsThis will generate a pkg subdirectory containing the following files:
larian_formats_bg.wasm
larian_formats_bg.wasm.d.ts
larian_formats.d.ts
larian_formats.js
package.json
README.mdwasm usage example
const larian_formats = require('./pkg/larian_formats');
const builder = new larian_formats.PakBuilder();
for (file of files) {
builder.add_file(file.path, file.contents);
}
const pak = builder.pack();