add npm packaging info

This commit is contained in:
ading2210 2024-01-28 22:56:14 -08:00
parent a7be55fd23
commit 58a8f2259e
5 changed files with 33 additions and 5 deletions

19
client/npm/package.json Normal file
View 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
View 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

View file

@ -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