Skip to content

Commit

Permalink
Updated screenshots script (References #319)
Browse files Browse the repository at this point in the history
  • Loading branch information
PKief committed Nov 24, 2018
1 parent cfef9f3 commit 6102993
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/preview/screenshots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as path from 'path';
import * as puppeteer from 'puppeteer';

export const createScreenshots = async (filePath: string, fileName: string) => {
const htmlFilePath = path.join(__dirname, '..', '..', filePath);
const htmlFilePath = path.join('file:', __dirname, '..', '..', filePath);

const browser = await puppeteer.launch();
const page = await browser.newPage();
Expand All @@ -11,7 +11,7 @@ export const createScreenshots = async (filePath: string, fileName: string) => {
width: 100
});

await page.goto(`file:${htmlFilePath}`);
await page.goto(htmlFilePath);

await page.screenshot({
path: `images/${fileName}.png`,
Expand Down

0 comments on commit 6102993

Please sign in to comment.