mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-06-22 16:05:56 +02:00
We currently download Chrome/Firefox immediately on `npm install` invocations because Puppeteer's postinstall script does that by default. However, this is wasteful if the user/workflow doesn't actually need to run Puppeteer or its browsers, for example in GitHub Actions workflows that do linting, static analysis or other tasks like updating locales or publishing artifacts. This commit therefore makes sure no browser binaries get pulled in by default anymore, and defers doing that until it's actually necessary, which is when we want to start the browsers in the `startBrowsers` function of `test.mjs`. Locally this brings the `npm install` runtime down from 8.998 to 1.800 seconds, and as a bonus it results in better log output too because it now shows which browser versions were used in the run (whereas previously with `npm install` this information was not sent to stdout).
14 lines
202 B
JSON
14 lines
202 B
JSON
{
|
|
"chrome": {
|
|
"skipDownload": true,
|
|
"version": "stable"
|
|
},
|
|
"chrome-headless-shell": {
|
|
"skipDownload": true
|
|
},
|
|
"firefox": {
|
|
"skipDownload": true,
|
|
"version": "nightly"
|
|
}
|
|
}
|