Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@npmcli/node-gyp

Package Overview
Dependencies
Maintainers
7
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@npmcli/node-gyp

Tools for dealing with node-gyp packages

  • 1.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.4M
decreased by-11.95%
Maintainers
7
Weekly downloads
 
Created

What is @npmcli/node-gyp?

The @npmcli/node-gyp package is a Node.js native addon build tool that interfaces with Google's GYP (Generate Your Projects) to build native addon modules in Node.js. It is a replacement and standalone version of the node-gyp bundled with npm. It helps in compiling Node.js native addon modules using Node.js's libuv and V8, among other dependencies.

What are @npmcli/node-gyp's main functionalities?

Building native addons

This code configures and builds a native addon using specific build settings. It sets the make command, architecture, and debug mode, then runs the build process.

const nodeGyp = require('@npmcli/node-gyp');

const config = {
  make: 'make', // or 'gmake' on some systems
  arch: process.arch,
  debug: false
};

nodeGyp.configure(config, (err) => {
  if (err) throw err;
  nodeGyp.build((err) => {
    if (err) throw err;
    console.log('Build completed!');
  });
});

Configuration of build environments

This code sample demonstrates how to clean up the build configuration for a project, which is useful when you want to ensure a fresh build environment.

const nodeGyp = require('@npmcli/node-gyp');

nodeGyp.clean((err) => {
  if (err) throw err;
  console.log('Configuration cleaned up.');
});

Other packages similar to @npmcli/node-gyp

Keywords

FAQs

Package last updated on 04 Oct 2021

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