From e0b66602a20404236055d69f8ba72967a68bf9e4 Mon Sep 17 00:00:00 2001 From: Tuan Anh Tran Date: Tue, 2 Jun 2020 11:16:20 +0700 Subject: [PATCH] feat: use prebuildify; still need to integrate with CI to automate publish --- index.js | 2 +- package.json | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 2079a86..265fbc1 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ const EventEmitter = require('events').EventEmitter const Stream = require('stream').Stream -const SaxParser = require('bindings')('sax_parser').SaxParser +const SaxParser = require('node-gyp-build')(__dirname).SaxParser const inherits = require('util').inherits inherits(SaxParser, EventEmitter) diff --git a/package.json b/package.json index 659b88e..fa7c8f9 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "test": "ava", "build": "node-gyp rebuild", - "install": "node-gyp rebuild", + "install": "node-gyp-build", "benchmark": "node benchmark", "fmt": "prettier --write **/*.js" }, @@ -31,8 +31,9 @@ }, "license": "MIT", "dependencies": { - "bindings": "^1.5.0", - "node-addon-api": "^3.0.0" + "node-addon-api": "^3.0.0", + "node-gyp-build": "^4.2.2", + "prebuildify": "^4.0.0" }, "devDependencies": { "ava": "^3.8.2",