mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-07-17 17:55:00 +00:00

* feat: add web target * dev: simple package rule * dev: update web release * dev: update workspace * ci: setup wasm pack * ci: correct path to upload * ci: build artifact * fix: update metadata and launch config
14 lines
359 B
JavaScript
14 lines
359 B
JavaScript
import tinymist_init from "../pkg/tinymist_core.js";
|
|
import * as tinymist from "../pkg/tinymist_core.js";
|
|
import fs from "fs";
|
|
|
|
const wasmData = fs.readFileSync("pkg/tinymist_core_bg.wasm");
|
|
|
|
async function main() {
|
|
await tinymist_init({
|
|
module_or_path: new Uint8Array(wasmData),
|
|
});
|
|
console.log(tinymist.version());
|
|
}
|
|
|
|
main().catch(console.error);
|