0.2.0 • Published 7 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-downloaderUsage
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(): stringGive the path to Firefox executable.
isDownloaded
fetcher.isDownloaded(): Promise<boolean>Checks if the executable is available.