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
{ | |
"name": "prerender", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "", | |
"license": "ISC", | |
"dependencies": { | |
"@alex.garcia/observable-prerender": "0.0.2" | |
} | |
} |
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
const { load } = require("@alex.garcia/observable-prerender"); | |
const puppeteer = require("puppeteer"); | |
async function main() { | |
const outputFolder = 'output' | |
const browser = await puppeteer.launch({ | |
defaultViewport: { | |
deviceScaleFactor: 1, | |
height: 900, | |
width: 900 | |
}, | |
// args: [`--window-size=${mapWidth},${mapHeight}`], | |
}); | |
const notebook = await load( | |
"@codingwithfire/pattern-moire-line-circle-grids", | |
["sketch"], | |
{ browser } | |
); | |
await notebook.screenshot("sketch", `${outputFolder}/screenshot.png`); | |
await notebook.browser.close(); | |
} | |
main(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment