Open berstend opened 4 years ago
PS: I made a documentation.js fork which allows to generate docs that look very similar to the pptr ones (based on JSDoc annotated TypeScript): https://github.com/berstend/documentation-markdown-themes/wiki#documentationjs-with-markdown-theme-support
e.g. this API documentation is auto-generated: https://github.com/berstend/puppeteer-extra/tree/master/packages/puppeteer-extra#api
Thanks for your kind words, much appreciated. :)
That documentation generator looks super nice. I hope I have some time over the holidays to give it a try. So far, I wrote the markdown by hand...
Regarding TypeScript: Interesting, so I guess I can resolve the problem by moving the type dependencies from devDependencies
to dependencies
? I guess this is a small burden for non-Typescript users anyway.
Hey there, great job with puppeteer-cluster π
I'm the maintainer of
puppeteer-extra
and while updating the readme with more usage examples (after rewriting the core in TS) I noticed how well extra + cluster play together. πSome thoughts and observations:
Firefox works really well out of the box with cluster (
const vanillaPuppeteer = require("puppeteer-firefox")
), which I found neat. π―The out of the box cluster experience is a bit impaired when using TypeScript:
There seems to be no strong consensus in the TS community how to best handle this, but the majority seems to lean towards moving type dependencies from
devDependencies
to the regular ones in npm packages for better DX of TS users.If you ever need to extend the
Puppeteer
interfaces (e.g.page.findRecaptchas()
):I eventually found a type safe way by shipping an ambient d.ts. This is pretty rough to do currently and requires some additional tooling but it works reliably (even when piping puppeteer through cluster). :)
Anyway, just wanted to give you a quick thumbs up for your work on cluster - this ticket can therefore be closed. :)