Socket
Book a DemoInstallSign in
Socket

prebuildify-load

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prebuildify-load

Build tool and bindings loader for native modules that supports prebuilds

latest
Source
npmnpm
Version
2.0.0
Version published
Maintainers
1
Created
Source

prebuildify-load

Build tool and bindings loader for native modules that supports prebuilds.

npm install prebuildify-load

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

Usage

prebuildify-load 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 prebuildify-load to the install script to your native project

{
  ...
  "scripts": {
    "install": "prebuildify-load || node-gyp build"
  }
}

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

var binding = require('prebuildify-load')(__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.

License

MIT

FAQs

Package last updated on 01 Aug 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts