File tree Expand file tree Collapse file tree 4 files changed +11
-2
lines changed
Expand file tree Collapse file tree 4 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "typescript.tsdk" : " node_modules\\ typescript\\ lib"
3+ }
Original file line number Diff line number Diff line change 11{
22 "name" : " capture-template" ,
3- "version" : " 1.1.12 " ,
3+ "version" : " 1.1.13 " ,
44 "description" : " This library is responsible for expanding a template web page and then capturing it PNG or PDF." ,
55 "main" : " build/index.js" ,
66 "types" : " build/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -74,6 +74,11 @@ export interface ICaptureOptions {
7474 */
7575 leaveBrowserOpen ?: boolean ;
7676
77+ /**
78+ * Specify the path to nightmare if it is to be included externally.
79+ */
80+ nightmarePath ?: string ;
81+
7782 /**
7883 * Specify the path to Electron if that's necessary for you.
7984 */
Original file line number Diff line number Diff line change @@ -130,7 +130,8 @@ export class WebPageRenderer implements IWebPageRenderer {
130130 }
131131 }
132132
133- const Nightmare = require ( "nightmare" ) ;
133+ const nightmareModulePath = ( this . options && this . options . nightmarePath ) || "nightmare" ;
134+ const Nightmare = require ( nightmareModulePath ) ;
134135 this . nightmare = new Nightmare ( nightmareOptions ) ;
135136
136137 this . nightmare . on ( 'crashed' , ( evt : any ) => {
You can’t perform that action at this time.
0 commit comments