This package allows you to use the typst library in the browser.
TODO
Running tests:
wasm-pack test --chrome --firefox --headless
Building the package:
wasm-pack build
You can then install the package in another npm project:
cd <your-npm-project>
npm install <path-to-this-repo>/pkg
If you are installing it in a project that already has @brief-jetzt/wasm-typst
installed, you may want to
modify it's package.json
: Make sure that the local dependency has the prefix @brief-jetzt
set, so that
your import statements keep working:
[…]
"dependencies": {
"@brief-jetzt/wasm-typst": "file:../../wasm-typst/pkg",
[…]
Run npm i
.
Note: The wasm bindings are based on this tutorial