Skip to content

Commit 2fee06a

Browse files
committed
using node-pre-gyp to manage binary files
1 parent eb26279 commit 2fee06a

18 files changed

Lines changed: 21 additions & 19 deletions

File tree

binding.gyp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
'targets': [
33
{
4-
'target_name': 'brig',
4+
'target_name': '<(module_name)',
55
'sources': [
66
'<!@(tools/genmoc.sh)',
77
'src/brig.cpp',
@@ -22,6 +22,7 @@
2222
'include_dirs': [
2323
"<!(node -e \"require('nan')\")"
2424
],
25+
'product_dir': '<(module_path)',
2526
'conditions': [
2627
['OS=="linux"', {
2728
'sources': [

lib/core.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11

22
var fs = require('fs');
33
var os = require('os');
4+
var path = require('path');
5+
var binary = require('node-pre-gyp');
6+
var binding_path = binary.find(path.resolve(path.join(__dirname, '..', 'package.json')));
7+
var binding = require(binding_path);
48

5-
var BrigCore = null;
9+
var BrigCore = binding;
10+
/*
611
try {
712
BrigCore = require(__dirname + '/../build/Release/brig.node');
813
} catch(err) {
@@ -33,5 +38,6 @@ if (!BrigCore) {
3338
}
3439
}
3540
}
41+
*/
3642

3743
module.exports = BrigCore;

native/darwin-x64-11/brig.node

-189 KB
Binary file not shown.

native/darwin-x64-14/brig.node

-195 KB
Binary file not shown.

native/darwin-x64-42/brig.node

-195 KB
Binary file not shown.

native/darwin-x64-43/brig.node

-195 KB
Binary file not shown.

native/darwin-x64-44/brig.node

-195 KB
Binary file not shown.

native/darwin-x64-46/brig.node

-201 KB
Binary file not shown.

native/darwin-x64-51/brig.node

-547 KB
Binary file not shown.

native/linux-armv7l-43/brig.node

-120 KB
Binary file not shown.

0 commit comments

Comments
 (0)