0.1.9 • Published 2 years ago

@ice/screenshot v0.1.9

Weekly downloads
22
License
MIT
Repository
github
Last release
2 years ago

@ice/screenshot

Take a screenshot of a web page in the terminal.

Options:

-V, --version                output the version number
-u, --url <url>              The target url or path to local server
-l, --local [local]          Set up a local server in [local] directory and take screenshot, defaults set up in `./`
-s, --selector <selector>    Select a element through CSS selector
-o, --output <output>        Output path
-h, --help                   output usage information

Usage

Install:

$ npm i -g @ice/screenshot

For ICE materials, you can take screenshot use following commands:

# for scaffold
$ npm run build && screenshot -l

# for block
$ npm run build && screenshot -l -s \#mountNode

Others:

# take a screenshot of taobao.com
$ screenshot -u https://www.taobao.com

# take screenshot of a element
$ screenshot -u https://www.taobao.com -s .service.J_Service

# take screenshot export to ~/taobao.jpg
$ screenshot -u https://www.taobao.com -o ~/taboa.jpg

# Set up local server in current working directory and take screenshot of http://localhost:8100/public/index.html
# By default, this will run the contents of current directory on a local server, the URL is http://localhost:8100
$ screenshot -u /public/index.html -l

# Set up local server in ./public directory and take screenshot of http://localhost:8100/index.html
# By default, this will run the contents of `public/` directory on a local server, the URL is http://localhost:8100
$ screenshot -u /index.html -l ./public

Puppeteer

The CLI based on Puppeteer. But we don't want to depend on puppeteer locally, because puppeteer takes a long to install, it's easy to install failed. So we will find puppeteer in the local node_modules, if not found, find in the global node_modules, if still not found, we will install it globally, and you don't need to install it again next time.

0.1.9-beta.1

2 years ago

0.1.9-beta.2

2 years ago

0.1.9-beta.5

2 years ago

0.1.9-beta.6

2 years ago

0.1.9-beta.3

2 years ago

0.1.9-beta.4

2 years ago

0.1.9-beta.9

2 years ago

0.1.9-beta.7

2 years ago

0.1.9-beta.8

2 years ago

0.1.9

2 years ago

0.1.8

3 years ago

0.1.8-2

3 years ago

0.1.8-1

3 years ago

0.1.8-0

3 years ago

0.1.7

4 years ago

0.1.7-alpha.0

4 years ago

0.1.6-0

4 years ago

0.1.6

4 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.4-2

5 years ago

0.1.4-1

5 years ago

0.1.4-0

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.1.0-1

5 years ago