musikid / firefox-downloader

Download and execute Firefox seamlessly.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

Download and execute Firefox seamlessly.


Languages

Language:TypeScript 61.8%Language:JavaScript 38.2%