Skip to content

Commit 31a2e75

Browse files
author
NoahAndrews
committed
Use node-gyp-build
1 parent 243ed4b commit 31a2e75

File tree

3 files changed

+24
-40
lines changed

3 files changed

+24
-40
lines changed

lib/binding.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import {promisify} from "util";
2-
const addon = require('bindings')('addon');
2+
import * as path from "path";
3+
const addon = require('node-gyp-build')(path.join(__dirname, '..'));
34

45
export interface CanMessage {
56
data: number[];

package-lock.json

Lines changed: 17 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,18 @@
1111
"url": "https://github.com/REVrobotics/node-can-bridge.git"
1212
},
1313
"dependencies": {
14-
"bindings": "^1.5.0",
15-
"node-addon-api": "1.7.2"
14+
"node-addon-api": "1.7.2",
15+
"node-gyp-build": "^4.6.0"
1616
},
1717
"devDependencies": {
1818
"@types/node": "^14.17.7",
1919
"node-gyp": "^7.1.2",
2020
"typescript": "^3.9.10"
2121
},
22-
"peerDependencies": {
23-
"node-gyp": "^7.0.0"
24-
},
2522
"scripts": {
26-
"install": "node-gyp rebuild",
27-
"prepublish": "node-gyp build && tsc",
28-
"pretest": "node-gyp build && tsc",
23+
"install": "node-gyp-build",
24+
"prepublishOnly": "node-gyp-build && tsc",
25+
"pretest": "node-gyp-build && tsc",
2926
"test": "node --napi-modules test/test_binding.js"
3027
},
3128
"engines": {

0 commit comments

Comments
 (0)