mirror of
https://github.com/ading2210/libcurl.js.git
synced 2025-05-12 14:00:01 -04:00
fix single file support
This commit is contained in:
parent
c3b58f66d0
commit
bb9d9239c0
4 changed files with 8 additions and 9 deletions
4
.github/workflows/build.yaml
vendored
4
.github/workflows/build.yaml
vendored
|
@ -20,10 +20,6 @@ jobs:
|
||||||
working-directory: ./client
|
working-directory: ./client
|
||||||
run: ./build.sh all
|
run: ./build.sh all
|
||||||
|
|
||||||
- name: run tests
|
|
||||||
working-directory: ./client
|
|
||||||
run: ./tests/run.sh
|
|
||||||
|
|
||||||
- name: upload img
|
- name: upload img
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -1,13 +1,16 @@
|
||||||
/* REPLACE
|
/* REPLACE
|
||||||
var asm ?= ?createWasm\(\);
|
var asm ?= ?createWasm\(\);
|
||||||
*/
|
*/
|
||||||
var asm = null;
|
if (isDataURI(wasmBinaryFile)) var asm = createWasm();
|
||||||
|
else var asm = null;
|
||||||
|
|
||||||
/* REPLACE
|
/* REPLACE
|
||||||
var wasmExports ?= ?createWasm\(\);
|
var wasmExports ?= ?createWasm\(\);
|
||||||
*/
|
*/
|
||||||
var wasmExports = null;
|
if (isDataURI(wasmBinaryFile)) var wasmExports = createWasm();
|
||||||
|
else var wasmExports = null;
|
||||||
|
|
||||||
/* DELETE
|
/* REPLACE
|
||||||
run\(\);\n\n
|
run\(\);\n\n
|
||||||
*/
|
*/
|
||||||
|
if (isDataURI(wasmBinaryFile)) run();
|
|
@ -3,7 +3,7 @@
|
||||||
<head>
|
<head>
|
||||||
<link rel="icon" href="data:;base64,=">
|
<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>
|
<script>
|
||||||
document.addEventListener("libcurl_load", ()=>{
|
document.addEventListener("libcurl_load", ()=>{
|
||||||
libcurl.set_websocket(`wss://${location.hostname}/ws/`);
|
libcurl.set_websocket(`wss://${location.hostname}/ws/`);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "libcurl.js",
|
"name": "libcurl.js",
|
||||||
"version": "0.1.1",
|
"version": "0.1.2",
|
||||||
"description": "An experimental port of libcurl to WebAssembly for use in the browser.",
|
"description": "An experimental port of libcurl to WebAssembly for use in the browser.",
|
||||||
"main": "libcurl.mjs",
|
"main": "libcurl.mjs",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue