chore: code formatting

This commit is contained in:
github-actions[bot]
2022-01-16 01:41:24 +00:00
parent 4fa62aad67
commit d3228a126a
94 changed files with 3875 additions and 3822 deletions

View File

@@ -3,19 +3,19 @@ import puppeteer from "puppeteer"
//Setup browser
const browser = await puppeteer.launch({
headless:true,
executablePath:process.env.PUPPETEER_BROWSER_PATH,
args:["--no-sandbox", "--disable-extensions", "--disable-setuid-sandbox", "--disable-dev-shm-usage"],
ignoreDefaultArgs:["--disable-extensions"],
headless: true,
executablePath: process.env.PUPPETEER_BROWSER_PATH,
args: ["--no-sandbox", "--disable-extensions", "--disable-setuid-sandbox", "--disable-dev-shm-usage"],
ignoreDefaultArgs: ["--disable-extensions"],
})
const page = await browser.newPage()
//Select markdown example and take screenshoot
await page.setViewport({width:600, height:600})
await page.setViewport({ width: 600, height: 600 })
await page.goto("https://github.com/lowlighter/metrics/blob/examples/metrics.markdown.md")
const clip = await page.evaluate(() => {
const {x, y, width, height} = document.querySelector("#readme").getBoundingClientRect()
return {x, y, width, height}
const { x, y, width, height } = document.querySelector("#readme").getBoundingClientRect()
return { x, y, width, height }
})
await page.screenshot({type:"png", path:"metrics.markdown.png", clip, omitBackground:true})
await page.screenshot({ type: "png", path: "metrics.markdown.png", clip, omitBackground: true })
await browser.close()