You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
mahdihty a077f4ed7b add git ignore 4 years ago
..
LICENSE init commit 4 years ago
README.md init commit 4 years ago
bin.js init commit 4 years ago
build-test.js init commit 4 years ago
index.js init commit 4 years ago
optional.js init commit 4 years ago
package.json init commit 4 years ago

README.md

node-gyp-build

Build tool and bindings loader for node-gyp that supports prebuilds.

npm install node-gyp-build

Use together with prebuildify to easily support prebuilds for your native modules.

Usage

node-gyp-build works similar to node-gyp build except that it will check if a build or prebuild is present before rebuilding your project.

It's main intended use is as an npm install script and bindings loader for native modules that bundle prebuilds using prebuildify.

First add node-gyp-build as an install script to your native project

{
  ...
  "scripts": {
    "install": "node-gyp-build"
  }
}

Then in your index.js, instead of using the bindings module use node-gyp-build to load your binding.

var binding = require('node-gyp-build')(__dirname)

If you do these two things and bundle prebuilds prebuildify your native module will work for most platforms without having to compile on install time AND will work in both node and electron without the need to recompile between usage.

Users can override node-gyp-build and force compiling by doing npm install --build-from-source.

License

MIT