[node] adhere to node module naming requirements

https://nodejs.org/api/addons.html#addons_building specifies that "The module_name must match the filename of the final binary (excluding the .node suffix).". While the mismatch between `mapbox-gl-native` and `mapbox_gl_native` hasn't caused issues so far, we should play by the book.
This commit is contained in:
Konstantin Käfer
2017-02-23 12:19:04 +01:00
parent 87be62f9e4
commit 6b0ad899b3
3 changed files with 3 additions and 3 deletions

View File

@@ -49,7 +49,7 @@ target_add_mason_package(mbgl-node PRIVATE geojson)
add_custom_command(
TARGET mbgl-node
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:mbgl-node> ${CMAKE_SOURCE_DIR}/lib/mapbox-gl-native.node
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:mbgl-node> ${CMAKE_SOURCE_DIR}/lib/mapbox_gl_native.node
)
mbgl_platform_node()

View File

@@ -2,7 +2,7 @@
// Shim to wrap req.respond while preserving callback-passing API
var mbgl = require('../../lib/mapbox-gl-native.node');
var mbgl = require('../../lib/mapbox_gl_native.node');
var constructor = mbgl.Map.prototype.constructor;
var Map = function(options) {

View File

@@ -1 +1 @@
var mbgl = require('../../../../lib/mapbox-gl-native');
var mbgl = require('../../../../lib/mapbox_gl_native');