Skip to content

Commit e53ec6d

Browse files
committed
Removes shyp, adds node-pre-gyp.
1 parent 5c59c38 commit e53ec6d

File tree

5 files changed

+28
-26
lines changed

5 files changed

+28
-26
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ build/*
22
node_modules
33
*~
44
*.log
5-
5+
src/binding/*

binding.gyp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@
44
'use_system_libusb%': 'false',
55
},
66
'targets': [
7+
{
8+
"target_name": "action_after_build",
9+
"type": "none",
10+
"dependencies": [ "<(module_name)" ],
11+
"copies": [
12+
{
13+
"files": [ "<(PRODUCT_DIR)/<(module_name).node" ],
14+
"destination": "<(module_path)"
15+
}
16+
]
17+
},
718
{
819
'target_name': 'usb_bindings',
920
'sources': [

package.json

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@
2525
}
2626
],
2727
"version": "1.0.5",
28-
"optionalDependencies": {
29-
"usb-shyp-win32-x64": "1.0.5",
30-
"usb-shyp-win32-ia32": "1.0.5",
31-
"usb-shyp-darwin-x64": "1.0.6"
32-
},
3328
"engines": {
3429
"node": ">=0.8.x"
3530
},
@@ -39,18 +34,26 @@
3934
"url": "https://github.com/nonolith/node-usb.git"
4035
},
4136
"scripts": {
42-
"install": "node shyp-blacklist.js win32-x64 win32-ia32 darwin-x64 || node-gyp rebuild",
37+
"install": "node-pre-gyp install --fallback-to-build",
4338
"test": "mocha --compilers coffee:coffee-script --grep Module",
4439
"full-test": "mocha --compilers coffee:coffee-script",
4540
"valgrind": "coffee -c test/usb.coffee; valgrind --leak-check=full --show-possibly-lost=no node --expose-gc --trace-gc node_modules/mocha/bin/_mocha -R spec"
4641
},
42+
"binary": {
43+
"module_name": "usb_bindings",
44+
"module_path": "./src/binding",
45+
"host": "https://tessel-builds.s3-us-west-2.amazonaws.com",
46+
"remote_path": "./pre-gyp/{name}/v{version}"
47+
},
4748
"dependencies": {
48-
"bindings-shyp": "~0.2.3",
49+
"node-pre-gyp": "0.5.x",
4950
"nan": "^1.6.0"
5051
},
52+
"bundledDependencies":["node-pre-gyp"],
5153
"devDependencies": {
5254
"coffee-script": "~1.6.2",
53-
"mocha": "~1.8.2"
55+
"mocha": "~1.8.2",
56+
"aws-sdk": "~2.0.0-rc.15"
5457
},
5558
"license": "MIT"
5659
}

shyp-blacklist.js

Lines changed: 0 additions & 16 deletions
This file was deleted.

usb.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
var usb = exports = module.exports = require("bindings-shyp")("usb_bindings")
1+
var binary = require('node-pre-gyp');
2+
var path = require('path');
3+
var binding_path = binary.find(path.resolve(path.join(__dirname,'./package.json')));
4+
5+
var usb = exports = module.exports = require(binding_path);
26
var events = require('events')
37
var util = require('util')
48

0 commit comments

Comments
 (0)