(options: RHelpPreviewerOptions, packageDir: string, unnamedId: number = 1)
| 104 | private readonly dummyPackageName: string; |
| 105 | |
| 106 | constructor(options: RHelpPreviewerOptions, packageDir: string, unnamedId: number = 1) { |
| 107 | this.packageDir = packageDir; |
| 108 | this.descriptionPath = path.join(this.packageDir, 'DESCRIPTION'); |
| 109 | this.manDir = path.join(this.packageDir, 'man'); |
| 110 | this.rPath = options.rPath; |
| 111 | this.callPreviewListener = () => options.previewListener?.(this); |
| 112 | this.isPackageDir = this.watchFiles(); |
| 113 | this.dummyPackageName = `UnnamedPackage${unnamedId}`; |
| 114 | this.indexTemplate = fs.readFileSync(options.indexTemplatePath, 'utf-8'); |
| 115 | this.rdToHtmlScriptFile = options.rdToHtmlScriptFile; |
| 116 | } |
| 117 | |
| 118 | public refresh(): void { |
| 119 | // nothing to do, since file watchers keep everything updated |
nothing calls this directly
no test coverage detected