mirror of
https://github.com/ading2210/libcurl.js.git
synced 2025-05-12 05:50:01 -04:00
add npm packaging info
This commit is contained in:
parent
a7be55fd23
commit
58a8f2259e
5 changed files with 33 additions and 5 deletions
2
.github/workflows/build.yaml
vendored
2
.github/workflows/build.yaml
vendored
|
@ -21,6 +21,6 @@ jobs:
|
|||
- name: upload img
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: out
|
||||
name: libcurl
|
||||
path: client/out/*
|
||||
compression-level: 9
|
|
@ -26,7 +26,7 @@ sudo apt install make cmake emscripten autoconf automake libtool pkg-config wget
|
|||
The build script will generate `client/out/libcurl.js` as well as `client/out/libcurl_module.mjs`, which is an ES6 module. You can supply the following arguments to the build script to control the build:
|
||||
- `release` - Use all optimizations.
|
||||
- `single_file` - Include the WASM binary in the outputted JS using base64.
|
||||
|
||||
- `all` - Build twice, once normally, and once as a single file.
|
||||
|
||||
## Javascript API:
|
||||
|
||||
|
|
19
client/npm/package.json
Normal file
19
client/npm/package.json
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"name": "libcurl.js",
|
||||
"version": "0.1.0",
|
||||
"description": "An experimental port of libcurl to WebAssembly for use in the browser.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/ading2210/libcurl.js.git"
|
||||
},
|
||||
"author": "ading2210",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"bugs": {
|
||||
"url": "https://github.com/ading2210/libcurl.js/issues"
|
||||
},
|
||||
"homepage": "https://github.com/ading2210/libcurl.js"
|
||||
}
|
9
client/publish.sh
Executable file
9
client/publish.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
#publish libcurl.js as an npm package
|
||||
#run build.sh first
|
||||
|
||||
cp npm/* out
|
||||
cp ../README.md out
|
||||
cd out
|
||||
npm publish
|
|
@ -24,12 +24,12 @@ fi
|
|||
if [ ! -d $BROTLI_PREFIX ]; then
|
||||
tools/brotli.sh
|
||||
fi
|
||||
if [ ! -d $CURL_PREFIX ]; then
|
||||
tools/curl.sh
|
||||
fi
|
||||
if [ ! -d $NGHTTP2_PREFIX ]; then
|
||||
tools/nghttp2.sh
|
||||
fi
|
||||
if [ ! -d $CURL_PREFIX ]; then
|
||||
tools/curl.sh
|
||||
fi
|
||||
|
||||
cp -r $OPENSSL_PREFIX/* $CURL_PREFIX
|
||||
cp -r $CJSON_PREFIX/* $CURL_PREFIX
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue