Skip to content

Commit

Permalink
node-pre-gyp version
Browse files Browse the repository at this point in the history
  • Loading branch information
wouterverweirder committed Mar 9, 2021
1 parent d68f710 commit 7a275bf
Show file tree
Hide file tree
Showing 5 changed files with 367 additions and 23 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ Thumbs.db
build/
.node_pre_gyprc
.vscode/
build-tmp*/
lib/binding/

# Ignore the downloaded SDK
/sdk
Expand Down
11 changes: 11 additions & 0 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@
}]
],
'defines': [ 'NAPI_DISABLE_CPP_EXCEPTIONS' ],
},
{
"target_name": "action_after_build",
"type": "none",
"dependencies": [ "<(module_name)" ],
"copies": [
{
"files": [ "<(PRODUCT_DIR)/<(module_name).node" ],
"destination": "<(module_path)"
}
]
}
]
}
8 changes: 6 additions & 2 deletions lib/kinect2.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
const kinect = require('bindings')('kinect2'),
{ EventEmitter } = require('events');
const { EventEmitter } = require('events');

const binary = require('@mapbox/node-pre-gyp');
const path = require('path');
const binding_path = binary.find(path.resolve(path.join(__dirname,'../package.json')));
const kinect = require(binding_path);

class Kinect2 extends EventEmitter {
constructor() {
Expand Down
Loading

0 comments on commit 7a275bf

Please sign in to comment.