diff --git a/index.js b/index.js index 5650132..df1f2f1 100644 --- a/index.js +++ b/index.js @@ -6,7 +6,7 @@ const os = require('os') const debug = require('debug')('speaker') -const binding = require('bindings')('binding') +const binding = require('node-gyp-build')(__dirname) const { Writable } = require('stream') // determine the native host endianness, the only supported playback endianness diff --git a/package.json b/package.json index 0b83e7d..eab3ad3 100644 --- a/package.json +++ b/package.json @@ -8,12 +8,15 @@ "main": "index.js", "types": "index.d.ts", "scripts": { + "install": "node-gyp-build", + "prebuild": "prebuildify --napi", "test": "standard && node-gyp rebuild --mpg123-backend=dummy && mocha --reporter spec" }, "dependencies": { "bindings": "^1.3.0", "buffer-alloc": "^1.1.0", - "debug": "^4.0.0" + "debug": "^4.0.0", + "node-gyp-build": "^4.2.0" }, "devDependencies": { "@types/node": "^12.12.14", diff --git a/prebuilds/win32-x64/electron.napi.node b/prebuilds/win32-x64/electron.napi.node new file mode 100644 index 0000000..58ed8b8 Binary files /dev/null and b/prebuilds/win32-x64/electron.napi.node differ diff --git a/prebuilds/win32-x64/node.napi.node b/prebuilds/win32-x64/node.napi.node new file mode 100644 index 0000000..3820f61 Binary files /dev/null and b/prebuilds/win32-x64/node.napi.node differ