You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
abp/src/Volo.Abp.AspNetCore.Mvc.UI/AbpAspNetCoreMvcUiModule.cs

47 lines
1.4 KiB

using System;
using System.Reflection;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AspNetCore.Mvc.Bundling;
using Volo.Abp.Modularity;
using Volo.Abp.VirtualFileSystem;
using Volo.Abp.VirtualFileSystem.Embedded;
namespace Volo.Abp.AspNetCore.Mvc
{
[DependsOn(typeof(AbpAspNetCoreMvcModule))]
public class AbpAspNetCoreMvcUiModule : AbpModule
{
public override void ConfigureServices(IServiceCollection services)
{
services.AddAssemblyOf<AbpAspNetCoreMvcUiModule>();
services.Configure<VirtualFileSystemOptions>(options =>
{
options.FileSets.Add(
new EmbeddedFileSet(
"/Views/",
GetType().GetTypeInfo().Assembly,
"Volo.Abp.AspNetCore.Mvc.Views"
)
);
options.FileSets.Add(
new EmbeddedFileSet(
"/wwwroot/",
GetType().GetTypeInfo().Assembly,
"Volo.Abp.AspNetCore.Mvc.wwwroot"
)
);
});
services.Configure<BundlingOptions>(options =>
{
options.ScriptBundles.Add("GlobalScripts", new[]
{
"/libs/abp/abp.js?_v" + DateTime.Now.Ticks
});
});
}
}
}