feat: build for js bindings

This commit is contained in:
thesimplekid
2024-06-06 00:29:06 +01:00
parent 2e86dbb630
commit 187f551c23
3 changed files with 57 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
.cargo/
target/
src/
scripts/
examples/
pkg/package.json
pkg/*.md
pkg/*.wasm
.gitignore
Cargo.toml
Cargo.lock
*.tgz

3
bindings/cdk-js/justfile Normal file
View File

@@ -0,0 +1,3 @@
pack:
rm -rf ./pkg
wasm-pack build --target web

View File

@@ -0,0 +1,42 @@
{
"name": "@cashudevkit/cdk",
"version": "0.0.0",
"description": "Cashu Dev Kit",
"keywords": [
"cashu"
"rust",
"bindings",
"javascript"
],
"license": "MIT",
"homepage": "https://github.com/cashubtc/cdk",
"repository": {
"type": "git",
"url": "git+https://github.com/cashubtc/cdk.git"
},
"bugs": {
"url": "https://github.com/cashubtc/cdk/issues"
},
"author": {
"name": "thesimplekid",
"email": "tsk@thesimplekid.com",
"url": "https://github.com/thesimplekid"
},
"main": "pkg/cdk_js.js",
"types": "pkg/cdk_js.d.ts",
"files": [
"pkg/cdk_js_bg.wasm.js",
"pkg/cdk_js_bg.wasm.d.ts",
"pkg/cdk_js.js",
"pkg/cdk_js.d.ts"
],
"devDependencies": {
"wasm-pack": "^0.10.2"
},
"engines": {
"node": ">= 10"
},
"scripts": {
"build": "wasm-pack build --target web",
}
}