Skip to content

Commit

Permalink
Copy binding.node and remove build files after building
Browse files Browse the repository at this point in the history
  • Loading branch information
jorangreef committed Aug 3, 2017
1 parent 769a13d commit 04e12ec
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@
"target_name": "binding",
"sources": [ "binding.cc" ],
"include_dirs": [ "<!(node -e \"require('nan')\")" ]
},
{
"target_name": "copy",
"type": "none",
"dependencies": [ "binding" ],
"copies": [
{
'destination': '<(module_root_dir)',
'files': ['<(module_root_dir)/build/Release/binding.node']
}
]
}
]
}
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ Base64.binding.javascript = (function() {
})();

try {
Base64.binding.native = require('./build/Release/binding.node');
Base64.binding.native = require('./binding.node');
Base64.binding.active = Base64.binding.native;
} catch (exception) {
// We use the Javascript binding if the native binding has not been compiled.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"homepage": "https://github.com/ronomon/base64#readme",
"scripts": {
"install": "node-gyp rebuild || exit 0",
"postinstall": "node-gyp clean",
"test": "node test.js"
},
"dependencies": {
Expand Down

0 comments on commit 04e12ec

Please sign in to comment.