-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathextensionConfig.js
More file actions
29 lines (27 loc) · 922 Bytes
/
extensionConfig.js
File metadata and controls
29 lines (27 loc) · 922 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* jslint esversion:11 */
const path = require("path");
const vscode = require("vscode");
const fs = require("./utils/vsFile.js");
const webViewHtmlRelativePath = "src/server/webView.html";
const injectedRelativePath = "src/server/listener/injected.html";
const webViewAssetsRelativePath = "src/server";
function ExtensionConfig() {
this.init = async (context) => {
this.extensionPath = context.extensionPath;
this.webViewHtmlPath = path.join(
this.extensionPath,
webViewHtmlRelativePath
);
this.webViewAssetsPath = path.join(
this.extensionPath,
webViewAssetsRelativePath
);
this.injectedPath = path.join(this.extensionPath, injectedRelativePath);
this.panelIconPath = vscode.Uri.file(
path.join(this.extensionPath, "assets/icon.svg")
);
this.injectCode = await fs.readFile(this.injectedPath);
};
return;
}
module.exports = new ExtensionConfig();