Browse Source
Merge pull request #14058 from abpframework/auto-merge/rel-6-0/1354
Merge branch dev with rel-6.0
pull/14059/head
Engincan VESKE
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
32 additions and
1 deletions
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/RemoveFilesStep.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/TemplateCodeDeleteStep.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/AppTemplateBase.cs
|
|
|
@ -0,0 +1,16 @@ |
|
|
|
namespace Volo.Abp.Cli.ProjectBuilding.Building.Steps; |
|
|
|
|
|
|
|
public class RemoveFilesStep : ProjectBuildPipelineStep |
|
|
|
{ |
|
|
|
private readonly string _filePath; |
|
|
|
|
|
|
|
public RemoveFilesStep(string filePath) |
|
|
|
{ |
|
|
|
_filePath = filePath; |
|
|
|
} |
|
|
|
|
|
|
|
public override void Execute(ProjectBuildContext context) |
|
|
|
{ |
|
|
|
context.Files.RemoveAll(file => file.Name.Contains(_filePath)); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -19,7 +19,7 @@ public class TemplateCodeDeleteStep : ProjectBuildPipelineStep |
|
|
|
file.Name.EndsWith(".ps1") || |
|
|
|
file.Name.EndsWith(".html") || |
|
|
|
file.Name.EndsWith(".ts") || |
|
|
|
file.Name.EndsWith(".scss")) |
|
|
|
file.Name.EndsWith(".css")) |
|
|
|
{ |
|
|
|
file.RemoveTemplateCode(context.Symbols); |
|
|
|
file.RemoveTemplateCodeMarkers(); |
|
|
|
|
|
|
|
@ -204,6 +204,8 @@ public abstract class AppTemplateBase : TemplateInfo |
|
|
|
steps.Add(new ChangeThemeStyleStep()); |
|
|
|
} |
|
|
|
|
|
|
|
RemoveThemeLogoFolders(context, steps); |
|
|
|
|
|
|
|
if (IsDefaultThemeForTemplate(context.BuildArgs.Theme.Value)) |
|
|
|
{ |
|
|
|
return; |
|
|
|
@ -213,6 +215,19 @@ public abstract class AppTemplateBase : TemplateInfo |
|
|
|
RemoveLeptonXThemePackagesFromPackageJsonFiles(steps, isProTemplate: IsPro(), uiFramework: context.BuildArgs.UiFramework); |
|
|
|
} |
|
|
|
|
|
|
|
private void RemoveThemeLogoFolders(ProjectBuildContext context, List<ProjectBuildPipelineStep> steps) |
|
|
|
{ |
|
|
|
if (context.BuildArgs.Theme is not Theme.Lepton && IsPro()) |
|
|
|
{ |
|
|
|
steps.Add(new RemoveFilesStep("/wwwroot/images/logo/lepton")); |
|
|
|
} |
|
|
|
|
|
|
|
if (context.BuildArgs.Theme is not Theme.LeptonX or Theme.LeptonXLite) |
|
|
|
{ |
|
|
|
steps.Add(new RemoveFilesStep("/wwwroot/images/logo/leptonx")); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private static bool IsDefaultThemeForTemplate(Theme theme) |
|
|
|
{ |
|
|
|
var defaultThemesForTemplates = new[] |
|
|
|
|