From 38cdc433d81e70159999bc5abe59f864f6108183 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Mon, 31 Oct 2022 11:18:58 +0300 Subject: [PATCH] Cli: Add `--skip-bundling` option for blazor wasm project creation --- .../Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs | 8 +++++++- .../Volo/Abp/Cli/Commands/ProjectCreationCommandBase.cs | 6 ++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs index b0927cbcc9..d104c313ed 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs @@ -105,7 +105,11 @@ public class NewCommand : ProjectCreationCommandBase, IConsoleCommand, ITransien await RunInstallLibsForWebTemplateAsync(projectArgs); } - await RunBundleForBlazorWasmTemplateAsync(projectArgs); + var skipBundling = commandLineArgs.Options.ContainsKey(Options.SkipBundling.Long) || commandLineArgs.Options.ContainsKey(Options.SkipBundling.Short); + if (!skipBundling) + { + await RunBundleForBlazorWasmTemplateAsync(projectArgs); + } await ConfigurePwaSupportForAngular(projectArgs); @@ -140,6 +144,8 @@ public class NewCommand : ProjectCreationCommandBase, IConsoleCommand, ITransien sb.AppendLine("--no-random-port (Use template's default ports)"); sb.AppendLine("--separate-auth-server (if supported by the template)"); sb.AppendLine("--local-framework-ref --abp-path (keeps local references to projects instead of replacing with NuGet package references)"); + sb.AppendLine("-sib|--skip-installing-libs (Doesn't run `abp install-libs` command after project creation)"); + sb.AppendLine("-sb|--skip-bundling (Doesn't run `abp bundle` command after Blazor Wasm project creation)"); sb.AppendLine(""); sb.AppendLine("Examples:"); sb.AppendLine(""); diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProjectCreationCommandBase.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProjectCreationCommandBase.cs index 646d8d4c08..88e6c7b74f 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProjectCreationCommandBase.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProjectCreationCommandBase.cs @@ -750,6 +750,12 @@ public abstract class ProjectCreationCommandBase public const string Long = "skip-installing-libs"; } + public static class SkipBundling + { + public const string Short = "sb"; + public const string Long = "skip-bundling"; + } + public static class Tiered { public const string Long = "tiered";