LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

node-gyp

cross-platform build tool for compiling Node

TLDR

Configure project
$ node-gyp configure
copy
Build native addon
$ node-gyp build
copy
Clean build files
$ node-gyp clean
copy
Rebuild (clean + configure + build)
$ node-gyp rebuild
copy
Install Node.js headers
$ node-gyp install
copy
Specify Node.js version
$ node-gyp rebuild --target=[18.0.0]
copy

SYNOPSIS

node-gyp command [options]

DESCRIPTION

node-gyp is a cross-platform build tool for compiling Node.js native addon modules. It uses GYP (Generate Your Projects) to create platform-specific build files.node-gyp requires Python and a C++ compiler (like gcc, clang, or MSVC).

PARAMETERS

configure

Generate build files.
build
Build native addon.
clean
Remove build directory.
rebuild
Full rebuild.
install
Install Node.js headers.
--target version
Node.js version.
--debug
Debug build.
--arch arch
Target architecture.

BINDING.GYP

$ {
  "targets": [{
    "target_name": "addon",
    "sources": ["src/addon.cc"],
    "include_dirs": [
      "<!(node -p \"require('node-addon-api').include\")"
    ]
  }]
}
copy

INSTALL

sudo pacman -S npm
copy
sudo apk add npm
copy
brew install npm
copy
nix profile install nixpkgs#node-gyp
copy

CAVEATS

Requires Python 3.x. Needs C++ build tools. Different requirements per OS. May need --python flag.

HISTORY

node-gyp was created by Nathan Rajlich (TooTallNate) to simplify building native Node.js addons across platforms.

SEE ALSO

npm(1), node(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid