Browse Source

Cli add-module: fix angular source code project finder

pull/8690/head
Yunus Emre Kalkan 5 years ago
parent
commit
a5897c03f8
  1. 25
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/Services/SourceCodeDownloadService.cs
  2. 6
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/AngularSourceCodeAdder.cs

25
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/Services/SourceCodeDownloadService.cs

@ -203,30 +203,7 @@ namespace Volo.Abp.Cli.Commands.Services
return false;
}
if (zipEntryName.Contains(Path.Combine("angular/e2e")))
{
return true;
}
if (zipEntryName.Contains(Path.Combine("angular/src")))
{
return true;
}
if (zipEntryName.Contains(Path.Combine("angular/node_modules")))
{
return true;
}
if (zipEntryName.Contains(Path.Combine("angular/scripts")))
{
return true;
}
if (zipEntryName.Contains(Path.Combine("angular/source-code-requirements")))
{
return true;
}
var fileName = Path.GetFileName(zipEntryName);
if (!string.IsNullOrEmpty(fileName) && zipEntryName.Equals("angular/" + fileName))
if (zipEntryName.StartsWith("angular/") && !zipEntryName.StartsWith("angular/projects"))
{
return true;
}

6
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/AngularSourceCodeAdder.cs

@ -246,6 +246,12 @@ namespace Volo.Abp.Cli.ProjectModification
var foldersUnderProject = Directory.GetDirectories(Path.Combine(folder, "projects"));
foreach (var folderUnderProject in foldersUnderProject)
{
if (Path.GetFileName(folderUnderProject) == "dev-app")
{
Directory.Delete(folderUnderProject, true);
continue;
}
if (Directory.Exists(Path.Combine(folder, Path.GetFileName(folderUnderProject))))
{
continue;

Loading…
Cancel
Save