puppeteer-screenshot-cli
Advanced tools
Comparing version 1.1.1 to 1.2.0
1.2.0 / 2018-02-10 | ||
================== | ||
* Redirect picture stream to stdout when `--output -` or `-o -` | ||
* Redirect picture stream to stdout when no `--output` given | ||
* Define minimum required node version to 6.4.0 | ||
1.1.1 / 2018-02-09 | ||
@@ -3,0 +10,0 @@ ================== |
10
index.js
@@ -26,2 +26,3 @@ #!/usr/bin/env node | ||
url, | ||
output, | ||
selector = 'body', | ||
@@ -31,3 +32,2 @@ width = 800, | ||
type = 'jpeg', | ||
output = `screenshot.${type}`, | ||
quality = type === 'jpeg' ? 90 : undefined, | ||
@@ -48,3 +48,5 @@ headless = true, | ||
await page.screenshot({ | ||
output = output === '-' ? undefined : output; | ||
const picture = await page.screenshot({ | ||
type, quality, fullPage, | ||
@@ -55,2 +57,6 @@ path: output, | ||
if (!output) { | ||
process.stdout.write(picture); | ||
} | ||
await browser.close(); | ||
@@ -57,0 +63,0 @@ }; |
{ | ||
"name": "puppeteer-screenshot-cli", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"engines": { | ||
"node": ">=6.4.0" | ||
}, | ||
"description": "Simple wrapper around Puppeteer to take screenshot from command line", | ||
@@ -23,4 +26,4 @@ "repository": "github:mabhub/puppeteer-screenshot-cli", | ||
"scripts": { | ||
"version": "git changelog && git add CHANGELOG.md" | ||
"version": "git changelog -t $npm_package_version && git add CHANGELOG.md" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4993
85