1
Fork 0

Documentation!

This commit is contained in:
Bauke 2023-08-07 15:20:51 +02:00
parent d7da74267b
commit 823e1f62a8
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
1 changed files with 2 additions and 0 deletions

View File

@ -45,6 +45,7 @@ async function main(): Promise<void> {
} }
} }
/** Run `codium --list-extensions` and return all the extensions as an array. */
async function getInstalledExtensions(): Promise<string[]> { async function getInstalledExtensions(): Promise<string[]> {
const extensions = await runAndReturnStdout("codium", { const extensions = await runAndReturnStdout("codium", {
args: ["--list-extensions"], args: ["--list-extensions"],
@ -52,6 +53,7 @@ async function getInstalledExtensions(): Promise<string[]> {
return extensions.trim().split("\n"); return extensions.trim().split("\n");
} }
/** Get all the saved extensions from the codium-extensions data file. */
async function getSavedExtensions(file: string): Promise<string[]> { async function getSavedExtensions(file: string): Promise<string[]> {
const extensions = await Deno.readTextFile(file); const extensions = await Deno.readTextFile(file);
return extensions.trim().split("\n"); return extensions.trim().split("\n");