Skip to content

Commit

Permalink
feat: add support for puppeteer.launch options
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewshawcare authored and chrisvxd committed Jul 22, 2018
1 parent 37dc447 commit 66a8e57
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/server/Story2sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ export default class Story2sketch {
symbolGutter = defaultSymbolGutter,
querySelector = "#root",
verbose = false,
stories
stories,
puppeteerOptions = {}
}) {
this.output = output;
this.url = url;
Expand All @@ -43,6 +44,7 @@ export default class Story2sketch {
this.querySelector = querySelector;
this.stories = stories;
this.verbose = verbose;
this.puppeteerOptions = puppeteerOptions;

// Sort viewports by width
this.sortedViewports = Object.keys(viewports)
Expand All @@ -63,7 +65,7 @@ export default class Story2sketch {
}

async init() {
this.browser = await puppeteer.launch();
this.browser = await puppeteer.launch(this.puppeteerOptions);

if (!this.stories || this.stories === "all") {
if (this.verbose) {
Expand Down

0 comments on commit 66a8e57

Please sign in to comment.