0.0.3 • Published 1 year ago
@yusukehirao/sorcerer v0.0.3
Sorcerer
Puppeteer manipulation utilities
Sorcerer is 操作er
. it's a silly name.
Install
npm i puppeteer @yusukehirao/sorcerer
yarn add puppeteer @yusukehirao/sorcerer
:warning: Need to install with puppeteer
Features
- Printing Page to PDF
- Page Visual Regression 🚧 WIP
Printing Page to PDF
sorcerer -p <URL>
sorcerer -p <URL1> -p <URL2> -p <URL3>
- Printing parallel.
- Print with note space.
- Fit width for A4.
- Create two document files for desktop and mobile on each page.
- Support the basic access authentication.
- Support lazy loading images and intersection observed elements because it scrolls to the page bottom.
- PDF Samples
Command Options
Option | Short | Default | Description |
---|---|---|---|
--print | -p | It accepts an URL then it prints the site to PDF. | |
--outDir | -o | CWD | Output destination. |
--headless | true | Headless mode of Puppeteer. |