![]() ![]() ![]() But how do you set up a monorepo? And what does it look like with a React web, and native app? Yarn workspaces, Lerna, Bazel are examples of some of the most well-known tools for the job. There are many tools which can handle a monorepo setup, all with their own distinct advantages. Some of the most popular React libraries are split up this way, see ‘react-router’ as an example. Goliath sized companies aren’t the only ones who do, or stand to gain from the technology.Īny software, or platform which has many distinct parts can be split up in this way to separate concerns, and maintain DRY, focused code. Google, Facebook, Microsoft, and all other tech giants use monorepos to organise, and run their systems. Otherwise you’re going to be abusing copy and paste in a way Larry Tesler won’t be proud of. For example, if you have a web, and native app which can share code, creating a ‘common’ or ‘shared’ repository can keep your code DRY. A new addExtra export, to patch any puppeteer compatible library with plugin functionality ( chrome-aws-lambda, etc).Monorepos are a great tool to use when you have code to share across many different repositories. ![]() That means out of the box type safety for fellow TS users and nice auto-completion in VSCode for JS users. Changelog 2.1.6 ➠ 3.1.1īig refactor, the core is now written in TypeScript □ the user-preferences plugin), look into xvfb-run if you still require a headless experience in these circumstances. We never broke compatibility and still support puppeteer down to very early versions from 2018.Ī few plugins won't work in headless mode (it's noted if that's the case) due to Chrome limitations (e.g. Puppeteer-extra and all plugins are tested continously in a matrix of current (stable & LTS) NodeJS and puppeteer versions. Thanks to transitive-bullshit for suggesting a modular plugin design, which was fun to implement.Thanks to skyiea for this PR that started the project idea.We use a monorepo powered by Lerna (and yarn workspaces), ava for testing, TypeScript for the core, the standard style for linting and JSDoc heavily to auto-generate markdown documentation based on code. Have a look the PuppeteerExtraPlugin base class documentation to get going and check out the existing plugins (minimal example is the anonymize-ua plugin) for reference. PRs and new plugins are welcome! □ The plugin API for puppeteer-extra is clean and fun to use. Please check the Contributing section below if you're interested in creating a plugin as well. Great for remotely intervening when an automated task gets stuck, like captchas.Use the Chromium screencast API to remotely view and interact with puppeteer sessions.Minimize and maximize puppeteer in real time.Please note that they're hosted outside the main project and not under our control or supervision. These plugins have been generously contributed by members of the community. puppeteer-extra-plugin-font-size.Ĭheck out the packages folder for more plugins. Has itself a plugin interface which is used by e.g.Allows setting custom Chrome/Chromium user preferences.Supports dynamic replacing, so the browser version stays intact and recent.Anonymizes the user-agent on all pages.Allows flash content to run on all sites without user interaction.Supports all resource types, blocking can be toggled dynamically.Blocks resources (images, media, css, etc.) in puppeteer.Makes quick puppeteer debugging and exploration fun with an interactive REPL.screencasting) accessible from the public internet Creates a secure tunnel to make the devtools frontend ( incl.Makes puppeteer browser debugging possible from anywhere.Very fast & efficient blocker for ads and trackers.Solves reCAPTCHAs and hCaptchas automatically, using a single line of code: page.solveRecaptchas().Applies various evasion techniques to make detection of puppeteer harder.e(AdblockerPlugin() Plugins □ puppeteer-extra-plugin-stealth Add adblocker plugin to block all ads and trackers (saves bandwidth)Ĭonst AdblockerPlugin = require('puppeteer-extra-plugin-adblocker') Add stealth plugin and use defaults (all tricks to hide puppeteer usage)Ĭonst StealthPlugin = require('puppeteer-extra-plugin-stealth') Any number of plugins can be added through `e()`Ĭonst puppeteer = require('puppeteer-extra') it augments the installed puppeteer with plugin functionality. Yarn add puppeteer-extra Quickstart // puppeteer-extra is a drop-in replacement for puppeteer, # puppeteer-extra works with any puppeteer version: Installation yarn add puppeteer puppeteer-extra A light-weight wrapper around puppeteer and friends to enable cool plugins through a clean interface.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |