Browse Source

Merge pull request #13150 from abpframework/auto-merge/rel-5-3/1164

Merge branch dev with rel-5.3
pull/13156/head
Enis Necipoglu 4 years ago
committed by GitHub
parent
commit
10fde0a365
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 0
      docs/en/Themes/LeptonXLite/AspNetCore.md
  2. 2
      docs/en/Themes/LeptonXLite/angular.md
  3. 5
      docs/en/Themes/LeptonXLite/blazor.md
  4. 2
      docs/en/UI/Blazor/Theming.md
  5. 6
      docs/en/docs-nav.json
  6. 69
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProjectCreationCommandBase.cs
  7. 2
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/SolutionName.cs

0
docs/en/Themes/LeptonXLite/mvc.md → docs/en/Themes/LeptonXLite/AspNetCore.md

2
docs/en/Themes/LeptonXLite/angular.md

@ -79,4 +79,4 @@ To change the logos and brand color of `LeptonX`, simply add the following CSS t
### Server Side
In order to migrate to LeptonX on your server side projects (Host and/or AuthServer projects), please follow the [Server Side Migration](mvc.md) document.
In order to migrate to LeptonX on your server side projects (Host and/or AuthServer projects), please follow the [Server Side Migration](AspNetCore.md) document.

5
docs/en/Themes/LeptonXLite/blazor.md

@ -16,7 +16,8 @@ LeptonX Lite has implementation for the ABP Framework Blazor WebAssembly & Blazo
## Installation
{{if UI == "Blazor"}}
- Complete the [MVC Razor Pages Installation](mvc.md#installation) for the **HttpApi.Host** application first. _If the solution is tiered/micro-service, complete the MVC steps for all MVC applications such as **HttpApi.Host** and if identity server is separated, install to the **OpenIddict**_.
- Complete the [MVC Razor Pages Installation](AspNetCore.md#installation) for the **HttpApi.Host** application first. _If the solution is tiered/micro-service, complete the MVC steps for all MVC applications such as **HttpApi.Host** and if identity server is separated, install to the **OpenIddict**_.
- Add **Volo.Abp.AspNetCore.Components.WebAssembly.LeptonXLiteTheme** package to your **Blazor WebAssembly** application with the following command:
@ -52,7 +53,7 @@ builder.RootComponents.Add<App>("#ApplicationContainer");
{{if UI == "BlazorServer"}}
- Complete the [MVC Razor Pages Installation](mvc.md#installation) first. _If the solution is tiered/micro-service, complete the MVC steps for all MVC applications such as **HttpApi.Host** and **AuthServer**_.
- Complete the [MVC Razor Pages Installation](AspNetCore.md#installation) first. _If the solution is tiered/micro-service, complete the MVC steps for all MVC applications such as **HttpApi.Host** and **AuthServer**_.
- Add **Volo.Abp.AspNetCore.Components.Server.LeptonXLiteTheme** package to your **Blazor server** application with the following command:

2
docs/en/UI/Blazor/Theming.md

@ -27,7 +27,7 @@ Currently, three themes are **officially provided**:
* The [Basic Theme](Basic-Theme.md) is the minimalist theme with the plain Bootstrap style. It is **open source and free**.
* The [Lepton Theme](https://commercial.abp.io/themes) is a **commercial** theme developed by the core ABP team and is a part of the [ABP Commercial](https://commercial.abp.io/) license.
* The [LeptonX Theme](https://x.leptontheme.com/) is a theme that has a [commercial](https://docs.abp.io/en/commercial/latest/themes/lepton-x/commercial/blazor) and a [lite](../../Themes/LeptonXLite/blazor.md) version.
* The [LeptonX Theme](https://x.leptontheme.com/) is a theme that has a [commercial](https://docs.abp.io/en/commercial/latest/themes/lepton-x/commercial/blazor) and a [lite](../../Themes/LeptonXLite/Blazor.md) version.
## Overall

6
docs/en/docs-nav.json

@ -721,7 +721,7 @@
},
{
"text": "LeptonX Lite",
"path": "Themes/LeptonXLite/mvc.md"
"path": "Themes/LeptonXLite/AspNetCore.md"
}
]
},
@ -837,7 +837,7 @@
},
{
"text": "LeptonX Lite",
"path": "Themes/LeptonXLite/blazor.md"
"path": "Themes/LeptonXLite/Blazor.md"
},
{
"text": "Branding",
@ -1112,7 +1112,7 @@
},
{
"text": "LeptonX Lite",
"path": "Themes/LeptonXLite/angular.md"
"path": "Themes/LeptonXLite/Angular.md"
}
]
},

69
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProjectCreationCommandBase.cs

@ -44,7 +44,7 @@ public abstract class ProjectCreationCommandBase
AngularPwaSupportAdder angularPwaSupportAdder,
InitialMigrationCreator initialMigrationCreator,
ThemePackageAdder themePackageAdder,
ILocalEventBus eventBus)
ILocalEventBus eventBus)
{
ConnectionStringProvider = connectionStringProvider;
SolutionPackageVersionFinder = solutionPackageVersionFinder;
@ -149,17 +149,38 @@ public abstract class ProjectCreationCommandBase
SolutionName solutionName;
if (MicroserviceServiceTemplateBase.IsMicroserviceServiceTemplate(template))
{
var slnFile = Directory.GetFiles(outputFolderRoot, "*.sln").FirstOrDefault();
if (slnFile == null)
var slnPath = commandLineArgs.Options.GetOrNull(Options.MainSolution.Short, Options.MainSolution.Long);
if (slnPath == null)
{
slnPath = Directory.GetFiles(outputFolderRoot, "*.sln").FirstOrDefault();
}
else if (slnPath.EndsWith(".sln"))
{
Directory.SetCurrentDirectory(Path.GetDirectoryName(slnPath));
outputFolderRoot = Path.GetDirectoryName(slnPath);
}
else if (!Directory.Exists(slnPath))
{
slnPath = null;
}
else
{
Directory.SetCurrentDirectory(slnPath);
outputFolderRoot = slnPath;
slnPath = Directory.GetFiles(outputFolderRoot, "*.sln").FirstOrDefault();
}
if (slnPath == null)
{
throw new CliUsageException("This command should be run inside a folder that contains a microservice solution!");
throw new CliUsageException($"This command should be run inside a folder that contains a microservice solution! Or use -{Options.MainSolution.Short} parameter.");
}
var microserviceSolutionName = Path.GetFileName(slnFile).RemovePostFix(".sln");
var microserviceSolutionName = Path.GetFileName(slnPath).RemovePostFix(".sln");
version ??= SolutionPackageVersionFinder.Find(slnFile);
version ??= SolutionPackageVersionFinder.Find(slnPath);
solutionName = SolutionName.Parse(microserviceSolutionName, projectName);
outputFolder = MicroserviceServiceTemplateBase.CalculateTargetFolder(outputFolderRoot, projectName);
outputFolder = MicroserviceServiceTemplateBase.CalculateTargetFolder(outputFolderRoot, solutionName.ProjectName);
uiFramework = uiFramework == UiFramework.NotSpecified ? FindMicroserviceSolutionUiFramework(outputFolderRoot) : uiFramework;
}
else
@ -206,10 +227,11 @@ public abstract class ProjectCreationCommandBase
protected void ExtractProjectZip(ProjectBuildResult project, string outputFolder)
{
EventBus.PublishAsync(new ProjectCreationProgressEvent {
EventBus.PublishAsync(new ProjectCreationProgressEvent
{
Message = "Extracting the solution archieve"
}, false);
using (var templateFileStream = new MemoryStream(project.ZipContent))
{
using (var zipInputStream = new ZipInputStream(templateFileStream))
@ -345,10 +367,11 @@ public abstract class ProjectCreationCommandBase
{
if (MicroserviceServiceTemplateBase.IsMicroserviceServiceTemplate(projectArgs.TemplateName))
{
await EventBus.PublishAsync(new ProjectCreationProgressEvent {
await EventBus.PublishAsync(new ProjectCreationProgressEvent
{
Message = "Building the microservice solution"
}, false);
CmdHelper.RunCmd("dotnet build /graphbuild", projectArgs.OutputFolder);
}
}
@ -361,11 +384,12 @@ public abstract class ProjectCreationCommandBase
MicroserviceServiceTemplateBase.IsMicroserviceTemplate(projectArgs.TemplateName))
{
Logger.LogInformation("Installing client-side packages...");
await EventBus.PublishAsync(new ProjectCreationProgressEvent {
await EventBus.PublishAsync(new ProjectCreationProgressEvent
{
Message = "Installing client-side packages"
}, false);
await InstallLibsService.InstallLibsAsync(projectArgs.OutputFolder);
}
}
@ -402,10 +426,11 @@ public abstract class ProjectCreationCommandBase
return;
}
await EventBus.PublishAsync(new ProjectCreationProgressEvent {
await EventBus.PublishAsync(new ProjectCreationProgressEvent
{
Message = "Creating the initial DB migration"
}, false);
await InitialMigrationCreator.CreateAsync(Path.GetDirectoryName(efCoreProjectPath), isLayeredTemplate);
}
@ -417,7 +442,7 @@ public abstract class ProjectCreationCommandBase
if (isAngular && isPwa)
{
Logger.LogInformation("Adding PWA Support to Angular app.");
AngularPwaSupportAdder.AddPwaSupport(projectArgs.OutputFolder);
}
}
@ -633,10 +658,16 @@ public abstract class ProjectCreationCommandBase
{
public const string Short = "pwa";
}
public static class MainSolution
{
public const string Short = "ms";
public const string Long = "main-solution";
}
public static class Theme
{
public const string Long = "theme";
}
}
}
}

2
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/SolutionName.cs

@ -19,6 +19,8 @@ public class SolutionName
public static SolutionName Parse(string fullName, string microserviceName)
{
microserviceName = microserviceName.Replace(".", string.Empty);
return new SolutionName(fullName + "." + microserviceName, fullName, microserviceName);
}

Loading…
Cancel
Save