Skip to content

Commit 60a9257

Browse files
committed
added npm package registration for wasm client
1 parent 74511a3 commit 60a9257

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,3 +553,10 @@ jobs:
553553
path: |
554554
${{runner.workspace}}/build_wasm/wasmclient/wasm-client.*
555555
if-no-files-found: error
556+
557+
- uses: actions/setup-node@v2
558+
with:
559+
registry-url: 'https://registry.npmjs.org'
560+
- run: npm publish ${{runner.workspace}}/build_wasm/wasmclient/
561+
env:
562+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

wasmclient/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ if(EMSCRIPTEN)
1616
mnemonic
1717
wallet_api
1818
)
19+
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/package.json.in" "${CMAKE_CURRENT_BINARY_DIR}/package.json")
20+
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/../License" "${CMAKE_CURRENT_BINARY_DIR}/License" COPYONLY)
21+
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/../README.md" "${CMAKE_CURRENT_BINARY_DIR}/README.md" COPYONLY)
1922

2023
set_target_properties(${TARGET_NAME} PROPERTIES COMPILE_FLAGS "-s USE_PTHREADS=1 -s DISABLE_EXCEPTION_CATCHING=0 "
2124
LINK_FLAGS "--bind -s DEMANGLE_SUPPORT=0 -s PTHREADS_DEBUG=0 -s SAFE_HEAP=0 -v -s SOCKET_DEBUG=0 -s DISABLE_EXCEPTION_CATCHING=0 -s VERBOSE=1 -s USE_PTHREADS=1 -s WASM=1 -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s MODULARIZE=1 -s ALLOW_BLOCKING_ON_MAIN_THREAD=0 -s ALLOW_MEMORY_GROWTH=1 -s USE_BOOST_HEADERS=1 -s ASSERTIONS=1 -s PTHREAD_POOL_SIZE='window.navigator.hardwareConcurrency < ${BEAM_WEB_WALLET_THREADS_NUM} ? window.navigator.hardwareConcurrency : ${BEAM_WEB_WALLET_THREADS_NUM}' -s EXPORT_NAME='BeamModule' -s WEBSOCKET_SUBPROTOCOL='null' -lidbfs.js -lworkerfs.js")

wasmclient/package.json.in

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "beam-wasm-client-@BRANCH_NAME@",
3+
"version": "@BEAM_VERSION@",
4+
"description": "WASM version of BEAM wallet client for '@BRANCH_NAME@' branch",
5+
"repository": {
6+
"type": "git",
7+
"url": "git+https://github.com/BeamMW/beam.git"
8+
},
9+
"files": [
10+
"wasm-client*"
11+
],
12+
"keywords": [
13+
"BEAM",
14+
"wallet",
15+
"cryptocurrency",
16+
"mimblewimble"
17+
],
18+
"author": "Beam Privacy",
19+
"license": "Apache-2.0",
20+
"bugs": {
21+
"url": "https://github.com/BeamMW/beam/issues"
22+
},
23+
"homepage": "https://github.com/BeamMW/beam#readme"
24+
}

0 commit comments

Comments
 (0)