diff --git a/build-wasm.sh b/build-wasm.sh new file mode 100755 index 0000000..f07b408 --- /dev/null +++ b/build-wasm.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# changing directory to ./rs/verifier +cd ./rs/verifier + +# checking if node_modules directory exists +if [ ! -d "./node_modules" ]; then + # install the dependencies using npm i command if node_modules not found + npm i +fi + +# build the project using npm run build command +npm run build \ No newline at end of file diff --git a/package.json b/package.json index 2d8b364..ef07ccd 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "main": "index.js", "scripts": { "build:ui": "NODE_ENV=production webpack --config webpack.web.config.js", + "build:wasm": "build-wasm.sh", "watch:ui": "NODE_ENV=development webpack --config webpack.web.config.js --watch", "dev:ui": "NODE_ENV=development webpack-dev-server --config webpack.web.config.js --hot", "build:server": "NODE_ENV=production webpack --config webpack.server.config.js", @@ -12,7 +13,7 @@ "nodemon:server": "NODE_ENV=development nodemon build/server/index.bundle.js", "dev:server": "NODE_ENV=development concurrently npm:watch:server npm:nodemon:server", "start": "node build/server/index.bundle.js", - "build": "concurrently npm:build:ui npm:build:server", + "build": "concurrently npm:build:wasm npm:build:ui npm:build:server", "dev": "concurrently npm:watch:ui npm:dev:server", "lint": "eslint .", "lint:fix": "eslint . --fix" diff --git a/rs/verifier/index.node b/rs/verifier/index.node index 40e1d14..1899b4a 100755 Binary files a/rs/verifier/index.node and b/rs/verifier/index.node differ