Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support an instance mode for node-html-to-image #95

Closed
wants to merge 1 commit into from

Commits on Jan 28, 2021

  1. Support an instance mode for node-html-to-image

    **This is a breaking API change (for now)**
    
    node-html-to-image's default export is now a function which returns an
    instance object with a render() method which is the old
    nodeHtmlToImage() functionality. The reason for doing this is to allow
    us to instantiate a single 'image maker' object that we call render() on
    multiple times and reuse the same puppeteer cluster.
    
    In addition,
    * Update the type definitions.
    * Use Cluster.execute() instead of Cluster.queue() plus Cluster.idle()
      as this will allow better use in concurrent situations. We will only
      wait for our jobs to finish rather than for the entire cluster to go
      idle.
    
    Fixes frinyvonnick#80
    joshk0 committed Jan 28, 2021
    Configuration menu
    Copy the full SHA
    040a6db View commit details
    Browse the repository at this point in the history