Browse Source

Merge pull request #18512 from abpframework/18236

Skip opening web browser after `abp new` command.
pull/18525/head
Engincan VESKE 2 years ago
committed by GitHub
parent
commit
3dcdb3783f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs
  2. 11
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProjectCreationCommandBase.cs

9
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs

@ -124,7 +124,10 @@ public class NewCommand : ProjectCreationCommandBase, IConsoleCommand, ITransien
await ConfigurePwaSupportForAngular(projectArgs);
OpenRelatedWebPage(projectArgs, template, isTiered, commandLineArgs);
if (!commandLineArgs.Options.ContainsKey(Options.NoOpenWebPage.Long))
{
OpenRelatedWebPage(projectArgs, template, isTiered, commandLineArgs);
}
}
private Task CheckCreatingRequirements(ProjectBuildArgs projectArgs)
@ -162,8 +165,8 @@ public class NewCommand : ProjectCreationCommandBase, IConsoleCommand, ITransien
requirementWarningMessages.AddFirst("NOTICE: The following tools are required to run your solution:");
await EventBus.PublishAsync(new ProjectPostRequirementsCheckedEvent
{
Message = requirementWarningMessages.JoinAsString(Environment.NewLine)
{
Message = requirementWarningMessages.JoinAsString(Environment.NewLine)
}, false);
foreach (var error in requirementWarningMessages)

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

@ -425,7 +425,7 @@ public abstract class ProjectCreationCommandBase
{
return;
}
var isWebassembly = projectArgs.UiFramework == UiFramework.Blazor;
var message = isWebassembly ? "Generating bundles for Blazor Wasm" : "Generating bundles for MAUI Blazor";
Logger.LogInformation(message + "...");
@ -440,7 +440,7 @@ public abstract class ProjectCreationCommandBase
{
path = Path.Combine(path, "apps");
}
var directory = Path.GetDirectoryName(
Directory.GetFiles(path, isWebassembly ? "*.Blazor.csproj" : "*.MauiBlazor.csproj", SearchOption.AllDirectories).First()
);
@ -455,7 +455,7 @@ public abstract class ProjectCreationCommandBase
{
return true;
}
if (projectArgs.TemplateName == MicroserviceProTemplate.TemplateName && projectArgs.UiFramework is UiFramework.Blazor)
{
return true;
@ -907,5 +907,10 @@ public abstract class ProjectCreationCommandBase
{
public const string Long = "theme-style";
}
public static class NoOpenWebPage
{
public const string Long = "no-open";
}
}
}

Loading…
Cancel
Save