Comparing version 1.1.3 to 1.1.4
@@ -1,3 +0,4 @@ | ||
import $l7i9T$puppeteer from "puppeteer"; | ||
import {normalize as $l7i9T$normalize} from "path"; | ||
import {argv as $eSn2T$argv, exit as $eSn2T$exit} from "process"; | ||
import $eSn2T$puppeteer from "puppeteer"; | ||
import {normalize as $eSn2T$normalize} from "path"; | ||
@@ -14,4 +15,4 @@ | ||
return new Promise(async (resolve, reject)=>{ | ||
outputFile = (0, $l7i9T$normalize)(outputFile); | ||
const browser = await (0, $l7i9T$puppeteer).launch({ | ||
outputFile = (0, $eSn2T$normalize)(outputFile); | ||
const browser = await (0, $eSn2T$puppeteer).launch({ | ||
headless: true | ||
@@ -37,6 +38,26 @@ }); | ||
const $cf838c15c8b009ba$export$4f653a8d4fdb37ed = (0, $173d6c6c8da44cf1$export$2e2bcd8739ae039); | ||
var /** | ||
* Prints the usage of the command line tool. | ||
*/ $ca8fa687ca32fe66$export$2e2bcd8739ae039 = ()=>{ | ||
console.log("Usage: printeer <url> <outputFile>"); | ||
}; | ||
export {$cf838c15c8b009ba$export$4f653a8d4fdb37ed as printeer}; | ||
/** | ||
* Main entry point of the print-web command! | ||
*/ (async function main() { | ||
// First argument is the URL that should be used to generate the PDF. | ||
// Second argument is the output file name. | ||
const url = $eSn2T$argv[2]; | ||
const outputFile = $eSn2T$argv[3]; | ||
// If url or outputFile is not provided, print usage and exit. | ||
if (!url || !outputFile) { | ||
(0, $ca8fa687ca32fe66$export$2e2bcd8739ae039)(); | ||
$eSn2T$exit(1); | ||
} | ||
await (0, $173d6c6c8da44cf1$export$2e2bcd8739ae039)(url, outputFile); | ||
})(); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "printeer", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"description": "Prints the specified web url to PDF or Image!", | ||
@@ -14,8 +14,7 @@ "main": "index.js", | ||
"scripts": { | ||
"cli": "node ./src/index.js", | ||
"build": "parcel build ./src/cli.js & mv index.* ./bin & parcel build ./src/index.js", | ||
"build-cli" : "" | ||
"build": "parcel build ./src/index.js", | ||
"build-cli": "parcel build ./src/cli.js & mv index.* ./bin", | ||
"parcel": "parcel" | ||
}, | ||
"dependencies": { | ||
"command-line-args": "^5.2.1", | ||
"puppeteer": "^16.1.0" | ||
@@ -22,0 +21,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
121629
1
136
- Removedcommand-line-args@^5.2.1
- Removedarray-back@3.1.0(transitive)
- Removedcommand-line-args@5.2.1(transitive)
- Removedfind-replace@3.0.0(transitive)
- Removedlodash.camelcase@4.3.0(transitive)
- Removedtypical@4.0.0(transitive)