0.2.0 • Published 6 years ago
firefox-downloader v0.2.0
firefox-downloader
Download and execute latest version of Firefox seamlessly. (experimental support for macOS)
Install
npm install firefox-downloader
Usage
import Fetcher from 'firefox-downloader'
// const Fetcher = require('firefox-downloader').default
const fetcher = new Fetcher(destination)
fetcher.download()
.then(firefoxPath => spawn(firefoxPath))
API
Fetcher
const fetcher = new Fetcher(destination: string, platform?: NodeJS.Platform)
download
fetcher.download(progressCallback?: (progress: number, size: number) => void): Promise<string>
Download Firefox to the provided destination. Take an optional function to indicate progress.
getPath
fetcher.getPath(): string
Give the path to Firefox executable.
isDownloaded
fetcher.isDownloaded(): Promise<boolean>
Checks if the executable is available.