Skip to content

Commit

Permalink
chore: add prebuildify and node-gyp-build
Browse files Browse the repository at this point in the history
  • Loading branch information
eliasmpw committed Jun 28, 2023
1 parent 15311f5 commit e50328d
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules
build
.DS_Store
keyring.h
keyring.so
keyring.lib
Expand Down
18 changes: 17 additions & 1 deletion package-lock.json

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

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
"@cosmjs/tendermint-rpc": "^0.30.1",
"dotenv": "^16.0.3",
"node-addon-api": "^1.1.0",
"node-gyp": "^9.3.1"
"node-gyp": "^9.3.1",
"node-gyp-build": "^4.6.0"
},
"scripts": {
"build:node": "node-gyp configure build --verbose",
"build:go:m1": "sh build-m1-mac.sh",
"build:go:amd64": "sh build-amd64-mac.sh",
"build:go": "sh build.sh",
"install": "node-gyp-build",
"test": "node --napi-modules ./test/test_binding.js",
"test:file": "node --napi-modules ./test/binding_file.spec.js",
"vitest": "vitest ./test/cosmjs.spec.mjs",
Expand Down
Binary file added prebuilds/darwin-arm64/node.napi.node
Binary file not shown.
2 changes: 1 addition & 1 deletion src/node/FileStore.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const fs = require("fs");
const path = require("path");
const keyring = require("../../build/Release/keyring-go");
const keyring = require('node-gyp-build')(path.join('__dirname', '../..'))

const { checkErrorInResponse, resolveTilde } = require("./utils");

Expand Down
3 changes: 2 additions & 1 deletion src/node/OsStore.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const keyring = require("../../build/Release/keyring-go");
const path = require("path");
const keyring = require('node-gyp-build')(path.join('__dirname', '../..'))

const { checkErrorInResponse } = require("./utils");

Expand Down

0 comments on commit e50328d

Please sign in to comment.