3.0.0 • Published 3 years ago
download-chromium v3.0.0
download-chromium
Download Chromium!
Caches executables locally so you never download them twice.
Comes with a convenient CLI, so you can do things like this:
$ $(download-chromium) --headless --screenshot --disable-gpu https://twitter.com/Usage
Use the CLI:
$ download-chromium
Downloading Chromium r499413...Done!
/Users/julian/.chromium-cache/chromium-mac-499413/chrome-mac/Chromium.app/Contents/MacOS/ChromiumOr use the JavaScript API:
const download = require('download-chromium')
const exec = await download()
console.log(`Downloaded Chromium to ${exec}`)$ node example.js
Downloaded Chromium to /Users/julian/.chromium-cache/chromium-mac-499413/chrome-mac/Chromium.app/Contents/MacOS/ChromiumInstallation
# for the CLI
$ npm install -g download-chromium
# for the API
$ npm install download-chromiumAPI
download
download({
platform = currentPlatform,
revision = '499413',
log = false,
onProgress = undefined,
installPath = '{__dirname}/.local-chromium' })Returns a Promise resolving with the Chromium executable path.
installPath: set the install path if you can't write to yournode_modules, eg from within anelectronpackaged app (installPath: require('electron').app.getPath('userData'))onProgress: track download progress.onProgressreceives one argument{ percent, transferred, total }
Kudos
This script was based on https://github.com/puppeteer/puppeteer/blob/11d94525c821ab1bb6e059f3b998a8660f597348/utils/ChromiumDownloader.js.
License
MIT
3.0.0
3 years ago
2.2.1
6 years ago
2.2.0
6 years ago
2.1.2
6 years ago
2.1.1
6 years ago
2.1.0
6 years ago
2.0.2
8 years ago
2.0.1
8 years ago
2.0.0
8 years ago
1.2.1
8 years ago
1.2.0
8 years ago
1.1.5
8 years ago
1.1.4
8 years ago
1.1.3
8 years ago
1.1.2
8 years ago
1.1.1
8 years ago
1.1.0
8 years ago
1.0.1
8 years ago
1.0.0
8 years ago