Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add executablePath to options #94

Merged
merged 5 commits into from
Jan 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,12 @@ you may use

Read more about [puppeteer troubleshooting.](https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md)

#### Docker

To run `react-snap` inside docker (especially when using alpine), you might want to use custom chromium executable.

For example, use `puppeteerExecutablePath: "/usr/bin/chromium-browser"` you can set chromium executable path to `/usr/bin/chromium-browser`.

### Semantic UI

[Semantic UI](https://semantic-ui.com/) is defined over class substrings that contain spaces
Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const defaultOptions = {
userAgent: "ReactSnap",
headless: true,
puppeteerArgs: [],
puppeteerExecutablePath: undefined,
publicPath: "/",
minifyCss: {},
minifyHtml: {
Expand Down
1 change: 1 addition & 0 deletions src/puppeteer_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ const crawl = async opt => {
const browser = await puppeteer.launch({
headless: options.headless,
args: options.puppeteerArgs,
executablePath: options.puppeteerExecutablePath,
handleSIGINT: false
});

Expand Down