MCPcopy
hub / github.com/dotnet/vscode-csharp / cleanAsync

Function cleanAsync

tasks/packaging/offlinePackagingTasks.ts:379–397  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

377}
378
379async function cleanAsync() {
380 // Read the .gitignore file and remove all directories which are in the form `.{folder}}/`
381 const gitignorePath = path.join(rootPath, '.gitignore');
382 if (!fs.existsSync(gitignorePath)) {
383 return;
384 }
385
386 const gitignoreContent = fs.readFileSync(gitignorePath, 'utf-8');
387 const directoryRegex = /^\.([a-zA-Z0-9_-]+)\/$/gm;
388 let match;
389 while ((match = directoryRegex.exec(gitignoreContent)) !== null) {
390 const directory = match[1];
391 const directoryPath = path.join(rootPath, `.${directory}`);
392 if (fs.existsSync(directoryPath)) {
393 console.log(`Removing directory ${directoryPath}`);
394 await fsextra.remove(directoryPath);
395 }
396 }
397}
398
399async function buildVsix(packageJSON: any, outputFolder: string, prerelease: boolean, platformInfo?: VSIXPlatformInfo) {
400 await acquireAndInstallAllNugetPackages(platformInfo, packageJSON, false);

Callers 2

installDependenciesFunction · 0.85
doPackageOfflineFunction · 0.85

Calls 2

existsSyncMethod · 0.80
logMethod · 0.80

Tested by

no test coverage detected