Skip to content

Commit

Permalink
Rewrite the js part to ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Duddino committed Nov 9, 2023
1 parent af78702 commit ef0d6de
Show file tree
Hide file tree
Showing 7 changed files with 512 additions and 534 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ pkg/
pkg_multicore/
wasm-pack.log
js/node_modules
js/pivx_shield.d.ts
js/pivx_shield.js
js/README.md
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.PHONY: all
all: pkg pkg_multicore js/pivx_shield.d.ts js/README.md
all: pkg pkg_multicore js/pivx_shield.js js/README.md

pkg: src/ Cargo.toml
wasm-pack build --target web
Expand All @@ -17,7 +17,7 @@ pkg_multicore: src/ Cargo.toml
js/README.md: README.md
cp README.md js/

js/pivx_shield.d.ts: js/pivx_shield.js js/node_modules
js/pivx_shield.js: js/pivx_shield.ts js/node_modules
cd js/; \
npm run build

Expand Down
7 changes: 7 additions & 0 deletions js/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
"name": "pivx-shield",
"version": "1.0.7",
"description": "WASM library for interoperation with the PIVX Shield sapling protocol.",
"files": [
"*"
"files": [
"*"
],
"module": "pivx_shield.js",
"typings": "pivx_shield.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "tsc --allowJs -d --emitDeclarationOnly pivx_shield.js"
"build": "tsc"
},
"dependencies": {
"bs58": "^5.0.0",
Expand All @@ -29,6 +29,7 @@
"url": "https://github.com/PIVX-Labs/pivx-shield"
},
"devDependencies": {
"@types/uuid": "^9.0.7",
"typescript": "^5.0.3"
}
}
Loading

0 comments on commit ef0d6de

Please sign in to comment.