aboutsummaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorJieiku2022-09-20 17:34:19 -0700
committerJieiku2022-09-20 17:34:19 -0700
commit864a89104bd444fbebb9dcbe3ed853c28f8b21e7 (patch)
treee9bd0165ac208d4b5ebe7ee2223c218f6ad78ed6 /static
parent7d691159df6e0f64129d3c11f4e8026dca3a72d1 (diff)
downloadabridge-864a89104bd444fbebb9dcbe3ed853c28f8b21e7.tar.gz
abridge-864a89104bd444fbebb9dcbe3ed853c28f8b21e7.tar.bz2
abridge-864a89104bd444fbebb9dcbe3ed853c28f8b21e7.zip
Fix index generation when all pages in a section are drafts, closes #93
Diffstat (limited to 'static')
-rw-r--r--static/stork.stbin299211 -> 270439 bytes
-rw-r--r--static/stork.wasmbin345812 -> 345812 bytes
-rw-r--r--static/tinysearch_engine.d.ts8
-rw-r--r--static/tinysearch_engine.js7
-rw-r--r--static/tinysearch_engine_bg.wasmbin97453 -> 93153 bytes
5 files changed, 10 insertions, 5 deletions
diff --git a/static/stork.st b/static/stork.st
index ae5e405..0543733 100644
--- a/static/stork.st
+++ b/static/stork.st
Binary files differ
diff --git a/static/stork.wasm b/static/stork.wasm
index ce550ce..1c7b52d 100644
--- a/static/stork.wasm
+++ b/static/stork.wasm
Binary files differ
diff --git a/static/tinysearch_engine.d.ts b/static/tinysearch_engine.d.ts
index e1f9bb2..d1b37dd 100644
--- a/static/tinysearch_engine.d.ts
+++ b/static/tinysearch_engine.d.ts
@@ -16,14 +16,16 @@ export interface InitOutput {
readonly __wbindgen_realloc: (a: number, b: number, c: number) => number;
}
+export type SyncInitInput = BufferSource | WebAssembly.Module;
/**
-* Synchronously compiles the given `bytes` and instantiates the WebAssembly module.
+* Instantiates the given `module`, which can either be bytes or
+* a precompiled `WebAssembly.Module`.
*
-* @param {BufferSource} bytes
+* @param {SyncInitInput} module
*
* @returns {InitOutput}
*/
-export function initSync(bytes: BufferSource): InitOutput;
+export function initSync(module: SyncInitInput): InitOutput;
/**
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
diff --git a/static/tinysearch_engine.js b/static/tinysearch_engine.js
index 180d3d9..7fa5084 100644
--- a/static/tinysearch_engine.js
+++ b/static/tinysearch_engine.js
@@ -168,12 +168,15 @@ function finalizeInit(instance, module) {
return wasm;
}
-function initSync(bytes) {
+function initSync(module) {
const imports = getImports();
initMemory(imports);
- const module = new WebAssembly.Module(bytes);
+ if (!(module instanceof WebAssembly.Module)) {
+ module = new WebAssembly.Module(module);
+ }
+
const instance = new WebAssembly.Instance(module, imports);
return finalizeInit(instance, module);
diff --git a/static/tinysearch_engine_bg.wasm b/static/tinysearch_engine_bg.wasm
index 9df2dea..90d2bb5 100644
--- a/static/tinysearch_engine_bg.wasm
+++ b/static/tinysearch_engine_bg.wasm
Binary files differ