-
Notifications
You must be signed in to change notification settings - Fork 219
Expand file tree
/
Copy pathui-reinit.ts
More file actions
30 lines (26 loc) · 1.05 KB
/
ui-reinit.ts
File metadata and controls
30 lines (26 loc) · 1.05 KB
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
30
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import chalk from "chalk";
import { unpackResources } from "../utils/node.js";
import { createShellConfigs } from "../utils/shell.js";
import {
shellResourcesPath,
nativeResourcesPath,
loggingResourcesPath,
initResourcesPath,
specResourcesPath,
versionResourcePath,
} from "../utils/constants.js";
import fs from "node:fs";
export const render = async () => {
fs.rmSync(shellResourcesPath, { recursive: true, force: true });
fs.rmSync(nativeResourcesPath, { recursive: true, force: true });
fs.rmSync(loggingResourcesPath, { recursive: true, force: true });
fs.rmSync(initResourcesPath, { recursive: true, force: true });
fs.rmSync(specResourcesPath, { recursive: true, force: true });
fs.rmSync(versionResourcePath, { force: true });
process.stdout.write(chalk.green("✓") + " removed old inshellisense resources \n");
await createShellConfigs();
await unpackResources();
process.stdout.write(chalk.green("✓") + " successfully installed inshellisense \n");
};