node-gyp-build
Build tool and bindings loader for node-gyp that supports prebuilds
Last updated 2 months ago by vweevers .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install node-gyp-build 
SYNC missed versions from official npm registry.

node-gyp-build

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

npm install node-gyp-build

Build Status

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

Usage

Note. Prebuild names have changed in prebuildify@3 and node-gyp-build@4. Please see the documentation below.

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 with 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.

Prebuilds will be attempted loaded from MODULE_PATH/prebuilds/... and then next EXEC_PATH/prebuilds/... (the latter allowing use with zeit/pkg)

Supported prebuild names

If so desired you can bundle more specific flavors, for example musl builds to support Alpine, or targeting a numbered ARM architecture version.

These prebuilds can be bundled in addition to generic prebuilds; node-gyp-build will try to find the most specific flavor first. Prebuild filenames are composed of tags. The runtime tag takes precedence, as does an abi tag over napi. For more details on tags, please see prebuildify.

Values for the libc and armv tags are auto-detected but can be overridden through the LIBC and ARM_VERSION environment variables, respectively.

License

MIT

Current Tags

  • 4.2.2                                ...           latest (2 months ago)

27 Versions

  • 4.2.2                                ...           2 months ago
  • 4.2.1                                ...           4 months ago
  • 4.2.0                                ...           8 months ago
  • 4.1.1                                ...           10 months ago
  • 4.1.0                                ...           a year ago
  • 3.9.0                                ...           a year ago
  • 4.0.0                                ...           a year ago
  • 3.8.0                                ...           a year ago
  • 3.7.0                                ...           2 years ago
  • 3.6.0                                ...           2 years ago
  • 3.5.1                                ...           2 years ago
  • 3.5.0                                ...           2 years ago
  • 3.4.0                                ...           2 years ago
  • 3.3.0                                ...           2 years ago
  • 3.2.2                                ...           3 years ago
  • 3.2.1                                ...           3 years ago
  • 3.2.0                                ...           3 years ago
  • 3.1.0                                ...           3 years ago
  • 3.0.1                                ...           3 years ago
  • 3.0.0                                ...           3 years ago
  • 2.0.2                                ...           3 years ago
  • 2.0.1                                ...           3 years ago
  • 2.0.0                                ...           3 years ago
  • 1.1.1                                ...           3 years ago
  • 1.1.0                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (2)
Downloads
Today 14
This Week 14
This Month 1,559
Last Day 147
Last Week 2,336
Last Month 11,001
Dependencies (0)
None
Dev Dependencies (3)
Dependents (141)

Copyright 2014 - 2016 © taobao.org |