Socket
Socket
Sign inDemoInstall

node-binary

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

node-binary

Download node binaries for various platforms and architectures, easily


Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

node-binary

npm version dependencies Build Status

Download node binaries for various platforms and architectures, easily.

var binary = require('node-binary');

binary.download({
	os: 'darwin',
	arch: 'x64',
	version: 'v0.12.0'
}, '/opt/node', function(error, binaryPath) {
	if(error) throw error;

	console.log('The node binary for OS X x64 was downloaded to ' + binaryPath);
});

Installation

Install node-binary by running:

$ npm install --save node-binary

CLI

node-binary provides a CLI version as well. Install it by running:

$ npm install -g node-binary

You can now download node binaries like this:

$ node-binary download v0.12.0 ~/Downloads --arch x64 --os darwin

Documentation

binary.download(Object options, String dest, Function callback)

Download a nodejs binary to a certain location.

options
  • os is the operating system to download node for.

This module curently supports darwin, win32, linux and sunos.

  • arch is the architecture to download node for.

This module curently supports x64 and x86.

  • version is the node version to download.

It can be a string such as v0.12.0 or simply 0.12.0.

dest

The directory to download the binary to.

The binary will automatically be renamed to node-<version>-<os>-<arch>[.exe].

callback(error, binaryPath)

The callback will be called with a possible error, or with the absolute path to the downloaded binary.

Tests

Run the test suite by doing:

$ gulp test

TODO

  • [ ] Implement a way to get the state of the download, to make use of a progress bar, etc.
  • [ ] Add executable mode to resulting binaries on UNIX.

Contribute

Before submitting a PR, please make sure that you include tests, and that coffeelint runs without any warning:

$ gulp lint

ChangeLog

v1.1.0

  • Improve error messages.
  • Prevent temporary directory from being undefined.

v1.0.1

Set mode to 755 for the downloaded binary.

Support

If you're having any problem, please raise an issue on GitHub.

License

The project is licensed under the MIT license.

Keywords

FAQs

Package last updated on 03 Mar 2015

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