From cdd006a971486bd6922277966492401b3f25af9f Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Sat, 9 Feb 2019 10:56:11 +0700 Subject: [PATCH] Require Node.js 8 and upgrade `pageres` --- .gitattributes | 3 +- .travis.yml | 3 +- cli.js | 90 ++++++++++++++++++++++---------------------------- package.json | 25 +++++--------- readme.md | 68 ++++++++++++++++---------------------- test/test.js | 24 +++++++------- 6 files changed, 91 insertions(+), 122 deletions(-) diff --git a/.gitattributes b/.gitattributes index 391f0a4..6313b56 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1 @@ -* text=auto -*.js text eol=lf +* text=auto eol=lf diff --git a/.travis.yml b/.travis.yml index 7d69d74..f3fa8cd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,4 @@ language: node_js node_js: + - '10' - '8' - - '6' - - '4' diff --git a/cli.js b/cli.js index dd48b89..503b4dc 100755 --- a/cli.js +++ b/cli.js @@ -34,21 +34,21 @@ const cli = meow(` Screenshots are saved in the current directory. Usage - pageres - pageres [ ] [ ] + $ pageres + $ pageres [ ] [ ] - Example - pageres todomvc.com yeoman.io 1366x768 1600x900 - pageres todomvc.com yeoman.io 1366x768 1600x900 --overwrite - pageres [ yeoman.io 1366x768 1600x900 --no-crop ] [ todomvc.com 1024x768 480x320 ] --crop - pageres todomvc.com 1024x768 --filename='<%= date %> - <%= url %>' - pageres yeoman.io 1366x768 --selector='.page-header' - pageres unicorn.html 1366x768 + Examples + $ pageres https://sindresorhus.com https://example.com 1366x768 1600x900 + $ pageres https://sindresorhus.com https://example.com 1366x768 1600x900 --overwrite + $ pageres [ https://example.com 1366x768 1600x900 --no-crop ] [ https://sindresorhus.com 1024x768 480x320 ] --crop + $ pageres https://sindresorhus.com 1024x768 --filename='<%= date %> - <%= url %>' + $ pageres https://example.com 1366x768 --selector='.page-header' + $ pageres unicorn.html 1366x768 Options - -v, --verbose Verbose output - -c, --crop Crop to the set height - -d, --delay= Delay screenshot capture + --verbose, -v Verbose output + --crop, -c Crop to the set height + --delay=, -d Delay screenshot capture --filename=