Browse Source

Add MudBlazor theming support with bundling configuration and contributors

feat/mudblazor
maliming 2 months ago
parent
commit
d5abc3f91b
No known key found for this signature in database GPG Key ID: A646B9CB645ECEA4
  1. 2
      framework/Volo.Abp.slnx
  2. 34
      framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.Bundling/AbpAspNetCoreComponentsMauiBlazorThemingMudBlazorBundlingModule.cs
  3. 3
      framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.Bundling/FodyWeavers.xml
  4. 30
      framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.Bundling/FodyWeavers.xsd
  5. 1
      framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.Bundling/MauiBlazorMudBlazorScriptContributor.cs
  6. 14
      framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.Bundling/MauiBlazorMudBlazorStandardBundles.cs
  7. 3
      framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.Bundling/MauiBlazorMudBlazorStyleContributor.cs
  8. 16
      framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.Bundling/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.Bundling.csproj
  9. 7
      framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor/AbpAspNetCoreComponentsMauiBlazorThemingMudBlazorModule.cs
  10. 2
      framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.csproj
  11. 2
      framework/src/Volo.Abp.AspNetCore.Components.Server.Theming.MudBlazor/Bundling/BlazorServerMudBlazorStyleContributor.cs
  12. 37
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.Bundling/AbpAspNetCoreComponentsWebAssemblyThemingMudBlazorBundlingModule.cs
  13. 1
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.Bundling/BlazorWebAssemblyMudBlazorScriptContributor.cs
  14. 14
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.Bundling/BlazorWebAssemblyMudBlazorStandardBundles.cs
  15. 3
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.Bundling/BlazorWebAssemblyMudBlazorStyleContributor.cs
  16. 3
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.Bundling/FodyWeavers.xml
  17. 30
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.Bundling/FodyWeavers.xsd
  18. 16
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.Bundling/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.Bundling.csproj
  19. 7
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor/AbpAspNetCoreComponentsWebAssemblyThemingMudBlazorModule.cs
  20. 2
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.csproj
  21. 8
      modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.MudBlazorBasicTheme.Bundling/AbpAspNetCoreComponentsWebAssemblyMudBlazorBasicThemeBundlingModule.cs
  22. 2
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyProjectNameBlazorModule.cs

2
framework/Volo.Abp.slnx

@ -10,6 +10,7 @@
<Project Path="src/Volo.Abp.AspNetCore.Bundling/Volo.Abp.AspNetCore.Bundling.csproj" />
<Project Path="src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling.csproj" />
<Project Path="src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.Bundling/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.Bundling.csproj" />
<Project Path="src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.Bundling/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.Bundling.csproj" />
<Project Path="src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.csproj" />
<Project Path="src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.csproj" />
<Project Path="src/Volo.Abp.AspNetCore.Components.MauiBlazor/Volo.Abp.AspNetCore.Components.MauiBlazor.csproj" />
@ -20,6 +21,7 @@
<Project Path="src/Volo.Abp.AspNetCore.Components.Web.Theming/Volo.Abp.AspNetCore.Components.Web.Theming.csproj" />
<Project Path="src/Volo.Abp.AspNetCore.Components.Web/Volo.Abp.AspNetCore.Components.Web.csproj" />
<Project Path="src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.Bundling/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.Bundling.csproj" />
<Project Path="src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.Bundling/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.Bundling.csproj" />
<Project Path="src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.csproj" />
<Project Path="src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.csproj" />
<Project Path="src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo.Abp.AspNetCore.Components.WebAssembly.csproj" />

34
framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.Bundling/AbpAspNetCoreComponentsMauiBlazorThemingMudBlazorBundlingModule.cs

@ -0,0 +1,34 @@
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.Modularity;
namespace Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.Bundling;
[DependsOn(
typeof(AbpAspNetCoreMvcUiBundlingAbstractionsModule)
)]
public class AbpAspNetCoreComponentsMauiBlazorThemingMudBlazorBundlingModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpBundlingOptions>(options =>
{
options.GlobalAssets.Enabled = true;
options.GlobalAssets.GlobalStyleBundleName = MauiBlazorMudBlazorStandardBundles.Styles.Global;
options.GlobalAssets.GlobalScriptBundleName = MauiBlazorMudBlazorStandardBundles.Scripts.Global;
options
.StyleBundles
.Add(MauiBlazorMudBlazorStandardBundles.Styles.Global, bundle =>
{
bundle.AddContributors(typeof(MauiBlazorMudBlazorStyleContributor));
});
options
.ScriptBundles
.Add(MauiBlazorMudBlazorStandardBundles.Scripts.Global, bundle =>
{
bundle.AddContributors(typeof(MauiBlazorMudBlazorScriptContributor));
});
});
}
}

3
framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.Bundling/FodyWeavers.xml

@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.Bundling/FodyWeavers.xsd

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

1
framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor/Bundling/MauiBlazorMudBlazorScriptContributor.cs → framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.Bundling/MauiBlazorMudBlazorScriptContributor.cs

@ -7,7 +7,6 @@ public class MauiBlazorMudBlazorScriptContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
//TODO@MudBlazor: Do we need this script, check ?
context.Files.AddIfNotContains("_content/MudBlazor/MudBlazor.min.js");
context.Files.AddIfNotContains("_content/Volo.Abp.AspNetCore.Components.Web/libs/abp/js/abp.js");
context.Files.AddIfNotContains("_content/Volo.Abp.AspNetCore.Components.Web/libs/abp/js/lang-utils.js");

14
framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.Bundling/MauiBlazorMudBlazorStandardBundles.cs

@ -0,0 +1,14 @@
namespace Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.Bundling;
public class MauiBlazorMudBlazorStandardBundles
{
public static class Styles
{
public static string Global = "MauiBlazorMudBlazor.Global";
}
public static class Scripts
{
public static string Global = "MauiBlazorMudBlazor.Global";
}
}

3
framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor/Bundling/MauiBlazorMudBlazorStyleContributor.cs → framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.Bundling/MauiBlazorMudBlazorStyleContributor.cs

@ -7,8 +7,7 @@ public class MauiBlazorMudBlazorStyleContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
//TODO@MudBlazor: Do we need this public font ?
context.Files.AddIfNotContains("https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap");
context.Files.AddIfNotContains(new BundleFile("https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap", true));
context.Files.AddIfNotContains("_content/MudBlazor/MudBlazor.min.css");
context.Files.AddIfNotContains("_content/Volo.Abp.AspNetCore.Components.Web/libs/abp/css/abp.css");
context.Files.AddIfNotContains("_content/Volo.Abp.MudBlazorUI/volo.abp.mudblazorui.css");

16
framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.Bundling/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.Bundling.csproj

@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<Import Project="..\..\..\configureawait.props" />
<Import Project="..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<WarningsAsErrors>Nullable</WarningsAsErrors>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Volo.Abp.AspNetCore.Mvc.UI.Bundling.Abstractions\Volo.Abp.AspNetCore.Mvc.UI.Bundling.Abstractions.csproj" />
</ItemGroup>
</Project>

7
framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor/AbpAspNetCoreComponentsMauiBlazorThemingMudBlazorModule.cs

@ -1,4 +1,3 @@
using Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.Bundling;
using Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.Bundling;
using Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor;
using Volo.Abp.AspNetCore.Components.MauiBlazor;
@ -8,7 +7,7 @@ using Volo.Abp.Modularity;
namespace Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor;
[DependsOn(
typeof(AbpAspNetCoreComponentsMauiBlazorThemingBundlingModule),
typeof(AbpAspNetCoreComponentsMauiBlazorThemingMudBlazorBundlingModule),
typeof(AbpAspNetCoreComponentsWebThemingMudBlazorModule),
typeof(AbpAspNetCoreComponentsMauiBlazorModule)
)]
@ -20,14 +19,14 @@ public class AbpAspNetCoreComponentsMauiBlazorThemingMudBlazorModule : AbpModule
{
options
.StyleBundles
.Add(MauiBlazorStandardBundles.Styles.Global, bundle =>
.Add(MauiBlazorMudBlazorStandardBundles.Styles.Global, bundle =>
{
bundle.AddContributors(typeof(MauiBlazorMudBlazorStyleContributor));
});
options
.ScriptBundles
.Add(MauiBlazorStandardBundles.Scripts.Global, bundle =>
.Add(MauiBlazorMudBlazorStandardBundles.Scripts.Global, bundle =>
{
bundle.AddContributors(typeof(MauiBlazorMudBlazorScriptContributor));
});

2
framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.csproj

@ -10,7 +10,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.Bundling\Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.Bundling.csproj" />
<ProjectReference Include="..\Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.Bundling\Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.MudBlazor.Bundling.csproj" />
<ProjectReference Include="..\Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor\Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor.csproj" />
<ProjectReference Include="..\Volo.Abp.AspNetCore.Components.MauiBlazor\Volo.Abp.AspNetCore.Components.MauiBlazor.csproj" />
</ItemGroup>

2
framework/src/Volo.Abp.AspNetCore.Components.Server.Theming.MudBlazor/Bundling/BlazorServerMudBlazorStyleContributor.cs

@ -8,7 +8,7 @@ public class BlazorServerMudBlazorStyleContributor : BundleContributor
public override void ConfigureBundle(BundleConfigurationContext context)
{
//TODO@MudBlazor: Do we need this public font ?
context.Files.AddIfNotContains("https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap");
context.Files.AddIfNotContains(new BundleFile("https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap", true));
context.Files.AddIfNotContains("/_content/MudBlazor/MudBlazor.min.css");
context.Files.AddIfNotContains("/_content/Volo.Abp.AspNetCore.Components.Web/libs/abp/css/abp.css");
context.Files.AddIfNotContains("/_content/Volo.Abp.MudBlazorUI/volo.abp.mudblazorui.css");

37
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.Bundling/AbpAspNetCoreComponentsWebAssemblyThemingMudBlazorBundlingModule.cs

@ -0,0 +1,37 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.Modularity;
namespace Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.Bundling;
[DependsOn(
typeof(AbpAspNetCoreMvcUiBundlingAbstractionsModule)
)]
public class AbpAspNetCoreComponentsWebAssemblyThemingMudBlazorBundlingModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpBundlingOptions>(options =>
{
options.GlobalAssets.Enabled = true;
options.GlobalAssets.GlobalStyleBundleName = BlazorWebAssemblyMudBlazorStandardBundles.Styles.Global;
options.GlobalAssets.GlobalScriptBundleName = BlazorWebAssemblyMudBlazorStandardBundles.Scripts.Global;
options
.StyleBundles
.Add(BlazorWebAssemblyMudBlazorStandardBundles.Styles.Global, bundle =>
{
bundle.AddContributors(typeof(BlazorWebAssemblyMudBlazorStyleContributor));
});
options
.ScriptBundles
.Add(BlazorWebAssemblyMudBlazorStandardBundles.Scripts.Global, bundle =>
{
bundle.AddContributors(typeof(BlazorWebAssemblyMudBlazorScriptContributor));
});
options.MinificationIgnoredFiles.Add("_content/Microsoft.AspNetCore.Components.WebAssembly.Authentication/AuthenticationService.js");
});
}
}

1
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor/Bundling/BlazorWebAssemblyMudBlazorScriptContributor.cs → framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.Bundling/BlazorWebAssemblyMudBlazorScriptContributor.cs

@ -8,7 +8,6 @@ public class BlazorWebAssemblyMudBlazorScriptContributor : BundleContributor
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.AddIfNotContains("_content/Microsoft.AspNetCore.Components.WebAssembly.Authentication/AuthenticationService.js");
//TODO@MudBlazor: Do we need this script, check ?
context.Files.AddIfNotContains("_content/MudBlazor/MudBlazor.min.js");
context.Files.AddIfNotContains("_content/Volo.Abp.AspNetCore.Components.Web/libs/abp/js/abp.js");
context.Files.AddIfNotContains("_content/Volo.Abp.AspNetCore.Components.Web/libs/abp/js/lang-utils.js");

14
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.Bundling/BlazorWebAssemblyMudBlazorStandardBundles.cs

@ -0,0 +1,14 @@
namespace Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.Bundling;
public class BlazorWebAssemblyMudBlazorStandardBundles
{
public static class Styles
{
public static string Global = "BlazorWebAssemblyMudBlazor.Global";
}
public static class Scripts
{
public static string Global = "BlazorWebAssemblyMudBlazor.Global";
}
}

3
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor/Bundling/BlazorWebAssemblyMudBlazorStyleContributor.cs → framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.Bundling/BlazorWebAssemblyMudBlazorStyleContributor.cs

@ -7,8 +7,7 @@ public class BlazorWebAssemblyMudBlazorStyleContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
//TODO@MudBlazor: Do we need this public font ?
context.Files.AddIfNotContains("https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap");
context.Files.AddIfNotContains(new BundleFile("https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap", true));
context.Files.AddIfNotContains("_content/MudBlazor/MudBlazor.min.css");
context.Files.AddIfNotContains("_content/Volo.Abp.AspNetCore.Components.Web/libs/abp/css/abp.css");
context.Files.AddIfNotContains("_content/Volo.Abp.MudBlazorUI/volo.abp.mudblazorui.css");

3
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.Bundling/FodyWeavers.xml

@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.Bundling/FodyWeavers.xsd

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

16
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.Bundling/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.Bundling.csproj

@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<Import Project="..\..\..\configureawait.props" />
<Import Project="..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<WarningsAsErrors>Nullable</WarningsAsErrors>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Volo.Abp.AspNetCore.Mvc.UI.Bundling.Abstractions\Volo.Abp.AspNetCore.Mvc.UI.Bundling.Abstractions.csproj" />
</ItemGroup>
</Project>

7
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor/AbpAspNetCoreComponentsWebAssemblyThemingMudBlazorModule.cs

@ -1,5 +1,4 @@
using Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor;
using Volo.Abp.AspNetCore.Components.WebAssembly.Theming.Bundling;
using Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.Bundling;
using Volo.Abp.AspNetCore.Components.WebAssembly;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
@ -8,7 +7,7 @@ using Volo.Abp.Modularity;
namespace Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor;
[DependsOn(
typeof(AbpAspNetCoreComponentsWebAssemblyThemingBundlingModule),
typeof(AbpAspNetCoreComponentsWebAssemblyThemingMudBlazorBundlingModule),
typeof(AbpAspNetCoreComponentsWebThemingMudBlazorModule),
typeof(AbpAspNetCoreComponentsWebAssemblyModule)
)]
@ -20,14 +19,14 @@ public class AbpAspNetCoreComponentsWebAssemblyThemingMudBlazorModule : AbpModul
{
options
.StyleBundles
.Add(BlazorWebAssemblyStandardBundles.Styles.Global, bundle =>
.Add(BlazorWebAssemblyMudBlazorStandardBundles.Styles.Global, bundle =>
{
bundle.AddContributors(typeof(BlazorWebAssemblyMudBlazorStyleContributor));
});
options
.ScriptBundles
.Add(BlazorWebAssemblyStandardBundles.Scripts.Global, bundle =>
.Add(BlazorWebAssemblyMudBlazorStandardBundles.Scripts.Global, bundle =>
{
bundle.AddContributors(typeof(BlazorWebAssemblyMudBlazorScriptContributor));
});

2
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.csproj

@ -10,7 +10,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Volo.Abp.AspNetCore.Components.WebAssembly.Theming.Bundling\Volo.Abp.AspNetCore.Components.WebAssembly.Theming.Bundling.csproj" />
<ProjectReference Include="..\Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.Bundling\Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.Bundling.csproj" />
<ProjectReference Include="..\Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor\Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor.csproj" />
<ProjectReference Include="..\Volo.Abp.AspNetCore.Components.WebAssembly\Volo.Abp.AspNetCore.Components.WebAssembly.csproj" />
</ItemGroup>

8
modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.MudBlazorBasicTheme.Bundling/AbpAspNetCoreComponentsWebAssemblyMudBlazorBasicThemeBundlingModule.cs

@ -1,13 +1,11 @@
using Volo.Abp.AspNetCore.Components.WebAssembly.Theming.Bundling;
using Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor;
using Volo.Abp.AspNetCore.Components.WebAssembly.Theming.MudBlazor.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.Modularity;
using BlazorWebAssemblyStandardBundles = Volo.Abp.AspNetCore.Components.WebAssembly.Theming.Bundling.BlazorWebAssemblyStandardBundles;
namespace Volo.Abp.AspNetCore.Components.WebAssembly.MudBlazorBasicTheme.Bundling;
[DependsOn(
typeof(AbpAspNetCoreComponentsWebAssemblyThemingMudBlazorModule)
typeof(AbpAspNetCoreComponentsWebAssemblyThemingMudBlazorBundlingModule)
)]
public class AbpAspNetCoreComponentsWebAssemblyMudBlazorBasicThemeBundlingModule : AbpModule
{
@ -15,7 +13,7 @@ public class AbpAspNetCoreComponentsWebAssemblyMudBlazorBasicThemeBundlingModule
{
Configure<AbpBundlingOptions>(options =>
{
var globalStyles = options.StyleBundles.Get(BlazorWebAssemblyStandardBundles.Styles.Global);
var globalStyles = options.StyleBundles.Get(BlazorWebAssemblyMudBlazorStandardBundles.Styles.Global);
globalStyles.AddContributors(typeof(WebAssemblyMudBlazorBasicThemeBundleStyleContributor));
});
}

2
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyProjectNameBlazorModule.cs

@ -15,8 +15,6 @@ namespace MyCompanyName.MyProjectName.Blazor;
[DependsOn(
typeof(AbpAutofacModule),
typeof(AbpAspNetCoreMvcUiBundlingModule),
//TODO@MudBlazor: Enable When LeptonXLite Theme Support MudBlazor is ready
// typeof(AbpAspNetCoreComponentsWebAssemblyLeptonXLiteThemeBundlingModule)
typeof(AbpAspNetCoreComponentsWebAssemblyMudBlazorBasicThemeBundlingModule)
)]
public class MyProjectNameBlazorModule : AbpModule

Loading…
Cancel
Save