download-chakracore
Version:
Download a Node-ChakraCore binary.
64 lines (39 loc) • 2.09 kB
Markdown
# download-chakracore
**Deprecated. The [Node-ChakraCore](https://github.com/nodejs/node-chakracore) project has been archived.**
---
**Download a [Node-ChakraCore](https://github.com/nodejs/node-chakracore#installing-prebuilt-node-chakracore-binaries) binary.**
[](https://www.npmjs.com/package/download-chakracore)
[](https://travis-ci.org/derhuerst/download-chakracore)

[](https://gitter.im/derhuerst)
[](https://patreon.com/derhuerst)
## Installing
```shell
npm install download-chakracore
```
## Requirements
In order to use this, you need `unzip` or `tar`. `download-chakracore` will prefer `.zip` over `.tar.gz` when downloading from [the releases](https://github.com/nodejs/node-chakracore/releases).
## Usage from the command line
```shell
download-chakracore <destination>
```
`destination` must be the final path of the `node` executable.
## Usage from JS
```js
const download = require('download-chakracore')
download(dest, {log: console.log})
```
`dest` must be the final path of the `node` executable. `opt` partially overrides the following defaults:
```js
{
version: 'latest',
arch: process.arch,
platform: process.platform,
cache: require('env-paths')('download-chakracore').cache,
githubToken: null,
log: () => {} // to log messages
}
```
Returns a [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises) that rejects if an error occurs.
## Contributing
If you have a question or have difficulties using `download-chakracore`, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to [the issues page](https://github.com/derhuerst/download-chakracore/issues).