Hi,
I was working on this wonderful lib for my company purposes and thought I would share the outcome. It's not perfect rewrite (much work to do that I don't have much time for), but some prooved to be very useful.
Changes in this PR include:
Typescript initial configuration with model for react-snap options
As for additional build step for git users, I think keeping dist in repo would be enough to use it as-is when someone forks it and build step is quite easy
Replaced highland queue with puppeteer-cluster for more stable run on long list of pages
In my case we run ~2000 pages with it. Some were not disposed properly and pipeline hanged near the end. Puppeteer cluster takes care of this problem and is also generally more stable and a little bit faster.
Updated puppeteer
Added hooks for css, html and page processing β allowing us to choose more freely final content
processPage runs twice β before inlining css (if enabled ofc) and before getting html content
Made minimalcss.minimize optional as it handles calls for css files separately and was buggy in some cases
I use purgecss on my side β with processCss hook.
More work should be done here sooner or later. I started to move some code around to make it more clear in some cases, but lot's to do here. Also β other packages should also be updated but I did not have much time for that now.
If you are open to some outside input (I can see lots of PRs are waiting for any approval) I can help you with remaining issues and make this lib even greater :smile:
Hi, I was working on this wonderful lib for my company purposes and thought I would share the outcome. It's not perfect rewrite (much work to do that I don't have much time for), but some prooved to be very useful.
Changes in this PR include:
processPage
runs twice β before inlining css (if enabled ofc) and before getting html contentMore work should be done here sooner or later. I started to move some code around to make it more clear in some cases, but lot's to do here. Also β other packages should also be updated but I did not have much time for that now.
If you are open to some outside input (I can see lots of PRs are waiting for any approval) I can help you with remaining issues and make this lib even greater :smile: