Add module with source code: Delete "app" folder after download

resolves https://github.com/abpframework/abp/issues/3159
pull/3564/head
Yunus Emre Kalkan 5 years ago
parent 65f4b1f10f
commit 1cccbad0b7

@ -107,14 +107,18 @@ namespace Volo.Abp.Cli.ProjectModification
private async Task DownloadSourceCodesToSolutionFolder(ModuleWithMastersInfo module, string modulesFolderInSolution, string version = null)
{
var targetModuleFolder = Path.Combine(modulesFolderInSolution, module.Name);
await SourceCodeDownloadService.DownloadAsync(
module.Name,
Path.Combine(modulesFolderInSolution, module.Name),
targetModuleFolder,
version,
null,
null
);
await DeleteAppFolderAsync(targetModuleFolder);
if (module.MasterModuleInfos == null)
{
return;
@ -126,6 +130,15 @@ namespace Volo.Abp.Cli.ProjectModification
}
}
private async Task DeleteAppFolderAsync(string targetModuleFolder)
{
var appFolder = Path.Combine(targetModuleFolder, "app");
if (Directory.Exists(appFolder))
{
Directory.Delete(appFolder, true);
}
}
private async Task AddNugetAndNpmReferences(ModuleWithMastersInfo module, string[] projectFiles)
{
foreach (var nugetPackage in module.NugetPackages)

Loading…
Cancel
Save