[node] add compatibility with node-pre-gyp binary publishing

This commit is contained in:
Konstantin Käfer
2018-06-26 09:03:23 -07:00
parent 95fd7ee742
commit 488b68c693
3 changed files with 5 additions and 5 deletions

View File

@@ -19,7 +19,7 @@ create_source_groups(mbgl-loop-node)
add_node_module(mbgl-node
INSTALL_DIR "lib"
INSTALL_PATH "lib/{node_abi}/mbgl.node"
NAN_VERSION "2.10.0"
EXCLUDE_NODE_ABIS 47 51 59 # Don't build old beta ABIs 5.x, 7.x, and 9.x
)

View File

@@ -13,7 +13,7 @@
},
"license": "BSD-2-Clause",
"dependencies": {
"@mapbox/cmake-node-module": "^1.0.0",
"@mapbox/cmake-node-module": "^1.1.0",
"node-pre-gyp": "^0.6.37",
"npm-run-all": "^4.0.2"
},
@@ -47,8 +47,8 @@
},
"gypfile": true,
"binary": {
"module_name": "mapbox_gl_native",
"module_path": "./lib/",
"module_name": "mbgl",
"module_path": "./lib/{node_abi}",
"host": "https://mapbox-node-binary.s3.amazonaws.com",
"remote_path": "./{name}/v{version}",
"package_name": "{node_abi}-{platform}-{arch}-{configuration}.tar.gz"

View File

@@ -2,7 +2,7 @@
// Shim to wrap req.respond while preserving callback-passing API
var mbgl = require('../../lib/mbgl-node.abi-' + process.versions.modules);
var mbgl = require('../../lib/node-v' + process.versions.modules + '/mbgl');
var constructor = mbgl.Map.prototype.constructor;
var Map = function(options) {