Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
8853eecbb9 | |||
1bfca4456c |
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartbrowser",
|
"name": "@pushrocks/smartbrowser",
|
||||||
"version": "1.0.10",
|
"version": "1.0.11",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartbrowser",
|
"name": "@pushrocks/smartbrowser",
|
||||||
"version": "1.0.10",
|
"version": "1.0.11",
|
||||||
"description": "simplified puppeteer",
|
"description": "simplified puppeteer",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist/index.d.ts",
|
||||||
|
18
ts/index.ts
18
ts/index.ts
@ -1,7 +1,21 @@
|
|||||||
import * as plugins from './smartbrowser.plugins';
|
import * as plugins from './smartbrowser.plugins';
|
||||||
|
|
||||||
export class SmartBrowser {
|
export class SmartBrowser {
|
||||||
pdfFromPage() {
|
puppeteer: plugins.puppeteer.Browser;
|
||||||
|
smartpdf: plugins.smartpdf.SmartPdf;
|
||||||
|
pdfFromPage(urlArg: string) {
|
||||||
|
this.smartpdf.getFullWebsiteAsSinglePdf(urlArg: );
|
||||||
|
}
|
||||||
|
|
||||||
|
public async start() {
|
||||||
|
this.smartpdf = new plugins.smartpdf.SmartPdf();
|
||||||
|
this.smartpdf.init();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* stops the smartbrowser instance
|
||||||
|
*/
|
||||||
|
stop() {
|
||||||
|
this.smartpdf.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
// pushrocks scope
|
||||||
|
import * as smartpdf from '@pushrocks/smartpdf';
|
||||||
|
|
||||||
|
export { smartpdf };
|
||||||
|
|
||||||
|
// third party
|
||||||
import * as puppeteer from 'puppeteer';
|
import * as puppeteer from 'puppeteer';
|
||||||
|
|
||||||
export { puppeteer };
|
export { puppeteer };
|
||||||
|
Reference in New Issue
Block a user