[node] add compatibility with node-pre-gyp binary publishing
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user