download-purescript
A Node.js module to download a prebuilt PureScript binary
const readdir = promises;const downloadPurescript = ; ;
Installation
npm install download-purescript
API
const downloadPurescript = ;
downloadPurescript([options])
options: Object
Return: Observable
(Kevin Smith's implementation)
When the Observable
is subscribed, it starts to download a tar.gz
archive of a PureScript binary for the current platform from the release page, extract it to the current working directory and successively send dl-tar's progress
objects to its Observer
.
Options
You can pass options to Request and node-tar's Unpack
constructor. Note that:
strip
option defaults to1
and can't be changed.- All files except for
purs
andpurs.exe
, for exampleREADME
, won't be downloaded by default. Pass() => true
tofilter
option if you want to download all files included in the archive. followRedirect
option defaults totrue
and cannot be disabled.
Additionally, you can use the following:
version
Type: string
Default: 0.12.5
Specify the version you want to download.
const execFileSync = ; ;
Error codes
Some errors emitted by this function have a peculiar code
property.
ERR_UNSUPPORTED_ARCH
The CPU architecture of the currently running operating system is not 64-bit.
ERR_UNSUPPORTED_PLATFORM
No prebuilt binary is provided for the current platform.
License
ISC License © 2017 - 2019 Shinnosuke Watanabe