()
| 377 | } |
| 378 | |
| 379 | async 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 | |
| 399 | async function buildVsix(packageJSON: any, outputFolder: string, prerelease: boolean, platformInfo?: VSIXPlatformInfo) { |
| 400 | await acquireAndInstallAllNugetPackages(platformInfo, packageJSON, false); |
no test coverage detected