Browse Source

Merge pull request #8690 from abpframework/Cli-add-module-fix-angular-source-code-project-finder

Cli add-module: fix angular source code project finder
pull/8719/head
Alper Ebicoglu 6 years ago
committed by GitHub
parent
commit
f6f08a0a9a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  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