diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/BasicThemeBundleContributor.cs b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/BasicThemeBundleContributor.cs index 6d6e8e12ed..edef97eb52 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/BasicThemeBundleContributor.cs +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/BasicThemeBundleContributor.cs @@ -4,12 +4,12 @@ namespace Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme { public class BasicThemeBundleContributor : IBundleContributor { - public void AddScripts(BundleContext context, BundleParameterDictionary parameters) + public void AddScripts(BundleContext context) { } - public void AddStyles(BundleContext context, BundleParameterDictionary parameters) + public void AddStyles(BundleContext context) { context.Add("_content/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/libs/abp/css/theme.css"); } diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/ThemingBundleContributor.cs b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/ThemingBundleContributor.cs index ea4b2fa000..70382a7dba 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/ThemingBundleContributor.cs +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/ThemingBundleContributor.cs @@ -4,12 +4,12 @@ namespace Volo.Abp.AspNetCore.Components.WebAssembly.Theming { public class ThemingBundleContributor : IBundleContributor { - public void AddScripts(BundleContext context, BundleParameterDictionary parameters) + public void AddScripts(BundleContext context) { } - public void AddStyles(BundleContext context, BundleParameterDictionary parameters) + public void AddStyles(BundleContext context) { context.BundleDefinitions.Insert(0, new BundleDefinition { diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ComponentsWebAssemblyBundleContributor.cs b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ComponentsWebAssemblyBundleContributor.cs index 343cb2c164..9f05ff24d1 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ComponentsWebAssemblyBundleContributor.cs +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ComponentsWebAssemblyBundleContributor.cs @@ -4,12 +4,12 @@ namespace Volo.Abp.AspNetCore.Components.WebAssembly { public class ComponentsWebAssemblyBundleContributor : IBundleContributor { - public void AddScripts(BundleContext context, BundleParameterDictionary parameters) + public void AddScripts(BundleContext context) { context.Add("_content/Volo.Abp.AspNetCore.Components.WebAssembly/libs/abp/js/abp.js"); } - public void AddStyles(BundleContext context, BundleParameterDictionary parameters) + public void AddStyles(BundleContext context) { } diff --git a/framework/src/Volo.Abp.BlazoriseUI/BlazoriseUIBundleContributor.cs b/framework/src/Volo.Abp.BlazoriseUI/BlazoriseUIBundleContributor.cs index 31c5e70f31..5dcc51c76a 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/BlazoriseUIBundleContributor.cs +++ b/framework/src/Volo.Abp.BlazoriseUI/BlazoriseUIBundleContributor.cs @@ -4,13 +4,13 @@ namespace Volo.Abp.BlazoriseUI { public class BlazoriseUIBundleContributor : IBundleContributor { - public void AddScripts(BundleContext context, BundleParameterDictionary parameters) + public void AddScripts(BundleContext context) { context.Add("_content/Blazorise/blazorise.js"); context.Add("_content/Blazorise.Bootstrap/blazorise.bootstrap.js"); } - public void AddStyles(BundleContext context, BundleParameterDictionary parameters) + public void AddStyles(BundleContext context) { context.Add("_content/Blazorise/blazorise.css"); context.Add("_content/Blazorise.Bootstrap/blazorise.bootstrap.css"); diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs index bed770dede..cbe577380f 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs @@ -79,7 +79,7 @@ namespace Volo.Abp.Cli.Bundling Directory = directory, FrameworkVersion = frameworkVersion, ProjectFileName = projectName, - BundleName = bundleConfig.Name, + BundleName = bundleConfig.Name.IsNullOrEmpty() ? "global" : bundleConfig.Name, Minify = bundleConfig.Mode == BundlingMode.BundleAndMinify }; @@ -98,12 +98,15 @@ namespace Volo.Abp.Cli.Bundling private BundleContext GetScriptContext(List bundleDefinitions, BundleParameterDictionary parameters) { - var scriptContext = new BundleContext(); + var scriptContext = new BundleContext + { + Parameters = parameters + }; foreach (var bundleDefinition in bundleDefinitions) { var contributor = CreateContributorInstance(bundleDefinition.BundleContributorType); - contributor.AddScripts(scriptContext, parameters); + contributor.AddScripts(scriptContext); } scriptContext.Add("_framework/blazor.webassembly.js"); @@ -113,12 +116,15 @@ namespace Volo.Abp.Cli.Bundling private BundleContext GetStyleContext(List bundleDefinitions, BundleParameterDictionary parameters) { - var styleContext = new BundleContext(); + var styleContext = new BundleContext + { + Parameters = parameters + }; foreach (var bundleDefinition in bundleDefinitions) { var contributor = CreateContributorInstance(bundleDefinition.BundleContributorType); - contributor.AddStyles(styleContext, parameters); + contributor.AddStyles(styleContext); } return styleContext; diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Bundling/BundleContext.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Bundling/BundleContext.cs index f2f94872ae..ccfcf426e5 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/Bundling/BundleContext.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Bundling/BundleContext.cs @@ -5,10 +5,12 @@ namespace Volo.Abp.Bundling public class BundleContext { public List BundleDefinitions { get; set; } - + public BundleParameterDictionary Parameters { get; set; } + public BundleContext() { BundleDefinitions = new List(); + Parameters = new BundleParameterDictionary(); } public void Add(string source, bool excludeFromBundle = false, diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Bundling/IBundleContributor.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Bundling/IBundleContributor.cs index e21fa4c4d0..deebcec213 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/Bundling/IBundleContributor.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Bundling/IBundleContributor.cs @@ -2,7 +2,7 @@ { public interface IBundleContributor { - void AddScripts(BundleContext context, BundleParameterDictionary parameters); - void AddStyles(BundleContext context, BundleParameterDictionary parameters); + void AddScripts(BundleContext context); + void AddStyles(BundleContext context); } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel.WebAssembly/Volo/Abp/Http/Client/IdentityModel/WebAssembly/IdentityModelWebAssemblyBundleContributor.cs b/framework/src/Volo.Abp.Http.Client.IdentityModel.WebAssembly/Volo/Abp/Http/Client/IdentityModel/WebAssembly/IdentityModelWebAssemblyBundleContributor.cs index 90ef6b7b09..7ee8c8108f 100644 --- a/framework/src/Volo.Abp.Http.Client.IdentityModel.WebAssembly/Volo/Abp/Http/Client/IdentityModel/WebAssembly/IdentityModelWebAssemblyBundleContributor.cs +++ b/framework/src/Volo.Abp.Http.Client.IdentityModel.WebAssembly/Volo/Abp/Http/Client/IdentityModel/WebAssembly/IdentityModelWebAssemblyBundleContributor.cs @@ -4,12 +4,12 @@ namespace Volo.Abp.Http.Client.IdentityModel.WebAssembly { public class IdentityModelWebAssemblyBundleContributor : IBundleContributor { - public void AddScripts(BundleContext context, BundleParameterDictionary parameters) + public void AddScripts(BundleContext context) { context.Add("_content/Microsoft.AspNetCore.Components.WebAssembly.Authentication/AuthenticationService.js"); } - public void AddStyles(BundleContext context, BundleParameterDictionary parameters) + public void AddStyles(BundleContext context) { }