@ice/screenshot
Take a screenshot of web page
Last updated 7 months ago by sobear .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @ice/screenshot 
SYNC missed versions from official npm registry.

@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.

Current Tags

  • 0.1.4-2                                ...           beta (8 months ago)
  • 0.1.5                                ...           latest (7 months ago)

10 Versions

  • 0.1.5                                ...           7 months ago
  • 0.1.4                                ...           8 months ago
  • 0.1.4-2                                ...           8 months ago
  • 0.1.4-1                                ...           8 months ago
  • 0.1.4-0                                ...           8 months ago
  • 0.1.3                                ...           9 months ago
  • 0.1.2                                ...           9 months ago
  • 0.1.1                                ...           a year ago
  • 0.1.0                                ...           a year ago
  • 0.1.0-1                                ...           a year ago
Downloads
Today 0
This Week 5
This Month 5
Last Day 4
Last Week 27
Last Month 45
Dependencies (9)
Dev Dependencies (0)
None
Dependents (2)

Copyright 2014 - 2016 © taobao.org |