Skip to content

Instantly share code, notes, and snippets.

@ebicoglu
Last active February 12, 2021 09:58
Show Gist options
  • Save ebicoglu/a486b5f81e11bd32045bb712f3d65ab4 to your computer and use it in GitHub Desktop.
Save ebicoglu/a486b5f81e11bd32045bb712f3d65ab4 to your computer and use it in GitHub Desktop.
Volo.Abp.AspNetCore.Mvc.UI.Theme.Commercial Project
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Bundling;
using Volo.Abp.Modularity;
using Volo.Abp.VirtualFileSystem;
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Commercial
{
[DependsOn(
typeof(AbpAspNetCoreMvcUiThemeSharedModule)
)]
public class AbpAspNetCoreMvcUiThemeCommercialModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<IMvcBuilder>(mvcBuilder =>
{
mvcBuilder.AddApplicationPartIfNotExists(typeof(AbpAspNetCoreMvcUiThemeCommercialModule).Assembly);
});
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<AbpAspNetCoreMvcUiThemeCommercialModule>();
});
Configure<AbpBundlingOptions>(options =>
{
options.ScriptBundles.Configure(
StandardBundles.Scripts.Global,
configuration =>
{
configuration.AddContributors(typeof(CommercialThemeScriptContributor));
});
});
}
}
}
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Bundling;
using Volo.Abp.Modularity;
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Commercial
{
[DependsOn(
typeof(SharedThemeGlobalScriptContributor)
)]
public class CommercialThemeScriptContributor : BundleContributor
{
//No content, just for dependency to the SharedThemeGlobalScriptContributor for now
}
}
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:53602/",
"sslPort": 44316
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Volo.Abp.AspNetCore.Mvc.UI.Theme.Commercial": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:5001;http://localhost:5000"
}
}
}
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<AssemblyName>Volo.Abp.AspNetCore.Mvc.UI.Theme.Commercial</AssemblyName>
<PackageId>Volo.Abp.AspNetCore.Mvc.UI.Theme.Commercial</PackageId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
<IsPackable>true</IsPackable>
<OutputType>Library</OutputType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="$(MicrosoftPackageVersion)" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared" Version="4.2.1" />
<PackageReference Include="Volo.Abp.Commercial.Core" Version="4.2.1" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="$(MicrosoftPackageVersion)" />
</ItemGroup>
</Project>
@ebicoglu
Copy link
Author

Folder structure:

image

@ebicoglu
Copy link
Author

ebicoglu commented Feb 12, 2021

Download the full project ➡️ Volo.Abp.AspNetCore.Mvc.UI.Theme.Commercial.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment