Skip to content
This repository was archived by the owner on Jul 31, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion binding.gyp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
'targets': [
{
'target_name': 'binding',
'target_name': 'bluetooth_hci_socket',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to use dashes in place of underscores here?

Copy link
Contributor

@DomiR DomiR Apr 16, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. We can use "<(module_name)" here but in the package file it needs to be a valid C variable name, so no dashes.
See https://github.com/mapbox/node-pre-gyp#module_name

'conditions': [
['OS=="linux" or OS=="android" or OS=="freebsd"', {
'sources': [
Expand Down
6 changes: 1 addition & 5 deletions lib/native.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
var events = require('events');

var binary = require('node-pre-gyp');
var path = require('path');
var binding_path = binary.find(path.resolve(path.join(__dirname,'./package.json')));
var binding = require(binding_path);
var binding = require('bindings')('bluetooth_hci_socket.node');

var BluetoothHciSocket = binding.BluetoothHciSocket;

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bluetooth-hci-socket",
"version": "0.5.2",
"version": "0.5.1",
"description": "Bluetooth HCI socket binding for Node.js",
"main": "index.js",
"repository": {
Expand All @@ -26,6 +26,7 @@
"win32"
],
"dependencies": {
"bindings": "~1.3.0",
"debug": "^2.2.0",
"nan": "^2.0.5",
"node-pre-gyp": "0.6.x"
Expand All @@ -42,7 +43,7 @@
"test": "jshint lib/*.js"
},
"binary": {
"module_name": "binding",
"module_name": "bluetooth_hci_socket",
"module_path": "./lib/binding/",
"host": "https://github.com/sandeepmistry/node-bluetooth-hci-socket/releases/download/",
"package_name": "{module_name}-{version}-{node_abi}-{platform}-{arch}.tar.gz",
Expand Down