Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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

  • 5.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
416K
decreased by-12.21%
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 05 Aug 2022

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc