fix single file support

This commit is contained in:
ading2210 2024-02-01 17:52:22 +00:00
parent c3b58f66d0
commit bb9d9239c0
4 changed files with 8 additions and 9 deletions

View file

@ -20,10 +20,6 @@ jobs:
working-directory: ./client
run: ./build.sh all
- name: run tests
working-directory: ./client
run: ./tests/run.sh
- name: upload img
uses: actions/upload-artifact@v4
with:

View file

@ -1,13 +1,16 @@
/* REPLACE
var asm ?= ?createWasm\(\);
*/
var asm = null;
if (isDataURI(wasmBinaryFile)) var asm = createWasm();
else var asm = null;
/* REPLACE
var wasmExports ?= ?createWasm\(\);
*/
var wasmExports = null;
if (isDataURI(wasmBinaryFile)) var wasmExports = createWasm();
else var wasmExports = null;
/* DELETE
/* REPLACE
run\(\);\n\n
*/
if (isDataURI(wasmBinaryFile)) run();

View file

@ -3,7 +3,7 @@
<head>
<link rel="icon" href="data:;base64,=">
<script defer src="./out/libcurl.js" onload="libcurl.load_wasm('/out/libcurl.wasm');"></script>
<script defer src="./out/libcurl_full.js"></script>
<script>
document.addEventListener("libcurl_load", ()=>{
libcurl.set_websocket(`wss://${location.hostname}/ws/`);

View file

@ -1,6 +1,6 @@
{
"name": "libcurl.js",
"version": "0.1.1",
"version": "0.1.2",
"description": "An experimental port of libcurl to WebAssembly for use in the browser.",
"main": "libcurl.mjs",
"scripts": {