|
|
|
@ -87,24 +87,39 @@ namespace Volo.Abp.Cli.ProjectModification |
|
|
|
await SolutionFileModifier.AddModuleToSolutionFileAsync(module, solutionFile); |
|
|
|
await NugetPackageToLocalReferenceConverter.Convert(module, solutionFile); |
|
|
|
|
|
|
|
await HandleAngularProject(module, solutionFile); |
|
|
|
await HandleAngularProject(modulesFolderInSolution, solutionFile); |
|
|
|
} |
|
|
|
|
|
|
|
ModifyDbContext(projectFiles, module, startupProject, skipDbMigrations); |
|
|
|
} |
|
|
|
|
|
|
|
private async Task HandleAngularProject(ModuleWithMastersInfo module, string solutionFilePath) |
|
|
|
private async Task HandleAngularProject(string modulesFolderInSolution, string solutionFilePath) |
|
|
|
{ |
|
|
|
var angularPath = Path.Combine(Path.GetDirectoryName(Path.GetDirectoryName(solutionFilePath)), "angular"); |
|
|
|
|
|
|
|
if (!Directory.Exists(angularPath)) |
|
|
|
{ |
|
|
|
DeleteAngularDirectoriesInModulesFolder(modulesFolderInSolution); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
await AngularModuleSourceCodeAdder.AddAsync(solutionFilePath, angularPath); |
|
|
|
} |
|
|
|
|
|
|
|
private static void DeleteAngularDirectoriesInModulesFolder(string modulesFolderInSolution) |
|
|
|
{ |
|
|
|
var moduleFolders = Directory.GetDirectories(modulesFolderInSolution); |
|
|
|
|
|
|
|
foreach (var moduleFolder in moduleFolders) |
|
|
|
{ |
|
|
|
var angDir = Path.Combine(moduleFolder, "angular"); |
|
|
|
if (Directory.Exists(angDir)) |
|
|
|
{ |
|
|
|
Directory.Delete(angDir, true); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private async Task DownloadSourceCodesToSolutionFolder(ModuleWithMastersInfo module, string modulesFolderInSolution, string version = null) |
|
|
|
{ |
|
|
|
var targetModuleFolder = Path.Combine(modulesFolderInSolution, module.Name); |
|
|
|
|