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 1
1
{
2
2
"name" : " capture-template" ,
3
- "version" : " 1.1.12 " ,
3
+ "version" : " 1.1.13 " ,
4
4
"description" : " This library is responsible for expanding a template web page and then capturing it PNG or PDF." ,
5
5
"main" : " build/index.js" ,
6
6
"types" : " build/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -74,6 +74,11 @@ export interface ICaptureOptions {
74
74
*/
75
75
leaveBrowserOpen ?: boolean ;
76
76
77
+ /**
78
+ * Specify the path to nightmare if it is to be included externally.
79
+ */
80
+ nightmarePath ?: string ;
81
+
77
82
/**
78
83
* Specify the path to Electron if that's necessary for you.
79
84
*/
Original file line number Diff line number Diff line change @@ -130,7 +130,8 @@ export class WebPageRenderer implements IWebPageRenderer {
130
130
}
131
131
}
132
132
133
- const Nightmare = require ( "nightmare" ) ;
133
+ const nightmareModulePath = ( this . options && this . options . nightmarePath ) || "nightmare" ;
134
+ const Nightmare = require ( nightmareModulePath ) ;
134
135
this . nightmare = new Nightmare ( nightmareOptions ) ;
135
136
136
137
this . nightmare . on ( 'crashed' , ( evt : any ) => {
You can’t perform that action at this time.
0 commit comments