GithubHelp home page GithubHelp logo

global-localhost / node-binary Goto Github PK

View Code? Open in Web Editor NEW

This project forked from balena-io/node-binary

0.0 0.0 0.0 22 KB

DEPRECATED: Download node binaries for various platforms and architectures, easily.

License: MIT License

JavaScript 20.94% CoffeeScript 79.06%

node-binary's Introduction

node-binary

npm version dependencies Build Status

Download node binaries for various platforms and architectures, easily.

THIS MODULE IS DEPRECATED AND IT'S NOT BEING MAINTAINED ANYMORE

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.

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.

node-binary's People

Contributors

jviotti avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.