🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

prebuildify

Package Overview
Dependencies
Maintainers
3
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prebuildify

Create and package prebuilds for native modules

6.0.1
latest
Source
npm
Version published
Weekly downloads
524K
-27.26%
Maintainers
3
Weekly downloads
 
Created

What is prebuildify?

The prebuildify npm package is used to prebuild native Node.js modules for multiple platforms and architectures. It simplifies the process of distributing prebuilt binaries, which can save users from having to compile the module from source.

What are prebuildify's main functionalities?

Prebuild Native Modules

This feature allows you to prebuild native modules for specified Node.js versions, platforms, and architectures. The code sample demonstrates how to prebuild a module for Node.js versions 14.17.0 and 16.0.0 on a Windows 64-bit platform.

const prebuildify = require('prebuildify');
prebuildify({
  targets: ['node-14.17.0', 'node-16.0.0'],
  platform: 'win32',
  arch: 'x64'
});

Generate Prebuilds for Multiple Platforms

This feature allows you to generate prebuilds for multiple platforms. The code sample shows how to prebuild a module for Node.js versions 14.17.0 and 16.0.0 on Windows, Linux, and macOS platforms for 64-bit architecture.

const prebuildify = require('prebuildify');
prebuildify({
  targets: ['node-14.17.0', 'node-16.0.0'],
  platforms: ['win32', 'linux', 'darwin'],
  arch: 'x64'
});

Custom Prebuild Scripts

This feature allows you to define custom scripts to run before and after the prebuild process. The code sample demonstrates how to add preinstall and postinstall scripts to the prebuild process.

const prebuildify = require('prebuildify');
prebuildify({
  targets: ['node-14.17.0', 'node-16.0.0'],
  platform: 'win32',
  arch: 'x64',
  scripts: {
    preinstall: 'echo Preinstall script',
    postinstall: 'echo Postinstall script'
  }
});

Other packages similar to prebuildify

FAQs

Package last updated on 17 Apr 2024

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