MCPcopy Create free account
hub / github.com/REditorSupport/vscode-R / constructor

Method constructor

src/helpViewer/helpPreviewer.ts:106–116  ·  view source on GitHub ↗
(options: RHelpPreviewerOptions, packageDir: string, unnamedId: number = 1)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

watchFilesMethod · 0.95
previewListenerMethod · 0.80

Tested by

no test coverage detected