-
-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): chromium fallback installer if system chrome is missing (#97
- Loading branch information
Showing
8 changed files
with
132 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Chrome Dependency | ||
|
||
Unlighthouse aims to keep the installation size small, for this reason it depends natively on your locally installed | ||
Chrome. | ||
|
||
As a fallback, it will download a Chromium binary for you. | ||
|
||
## Disabling system chrome | ||
|
||
You can disable the system chrome usage by providing `chrome.useSystem: false`. This will force the fallback installer to run. | ||
|
||
## Customizing the fallback installer | ||
|
||
When Chrome can't be found on your system or if the `chrome.useSystem: false` flag is passed, then a fallback will be attempted. | ||
|
||
This fallback will download a chrome binary for your system and use that path. | ||
|
||
There are a number of options you can customize on this. | ||
|
||
- `chrome.useDownloadFallback` - Disables the fallback installer | ||
- `chrome.downloadFallbackVersion` - Which version of chromium to use (default `1095492`) | ||
- `chrome.downloadFallbackCacheDir` - Where the binary should be saved (default `$home/.unlighthouse`) | ||
|
||
## Using your own chrome path | ||
|
||
You can provide your own chrome path by setting `puppeteerOptions.executablePath`. | ||
|
||
```ts | ||
export default { | ||
puppeteerOptions: { | ||
executablePath: '/usr/bin/chrome' | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.