mirror of https://github.com/abpframework/abp
parent
6991595175
commit
8f4b17cda5
@ -1,3 +1,4 @@
|
||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI
|
||||
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap
|
||||
@addTagHelper *, AbpDesk.Web.Mvc
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -0,0 +1,26 @@
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Volo.DependencyInjection;
|
||||
|
||||
namespace Volo.Abp.AspNetCore.Mvc.Bundling
|
||||
{
|
||||
public class BundleManager : IBundleManager, ITransientDependency
|
||||
{
|
||||
private readonly BundlingOptions _options;
|
||||
|
||||
public BundleManager(IOptions<BundlingOptions> options)
|
||||
{
|
||||
_options = options.Value;
|
||||
}
|
||||
|
||||
public List<string> GetStyleBundleFiles(string bundleName)
|
||||
{
|
||||
return _options.StyleBundles.GetFiles(bundleName);
|
||||
}
|
||||
|
||||
public List<string> GetScriptBundleFiles(string bundleName)
|
||||
{
|
||||
return _options.ScriptBundles.GetFiles(bundleName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
namespace Volo.Abp.AspNetCore.Mvc.Bundling
|
||||
{
|
||||
public class BundlingOptions
|
||||
{
|
||||
public BundleCollection StyleBundles { get; set; }
|
||||
|
||||
public BundleCollection ScriptBundles { get; set; }
|
||||
|
||||
public BundlingOptions()
|
||||
{
|
||||
StyleBundles = new BundleCollection();
|
||||
ScriptBundles = new BundleCollection();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Volo.Abp.AspNetCore.Mvc.Bundling
|
||||
{
|
||||
public interface IBundleManager
|
||||
{
|
||||
List<string> GetStyleBundleFiles(string bundleName);
|
||||
|
||||
List<string> GetScriptBundleFiles(string bundleName);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,5 @@
|
||||
@model List<string>
|
||||
@foreach (var scriptFile in Model)
|
||||
{
|
||||
<script src="@scriptFile" type="text/javascript"></script>
|
||||
}
|
||||
@ -0,0 +1,5 @@
|
||||
@model List<string>
|
||||
@foreach (var styleFile in Model)
|
||||
{
|
||||
<link rel="stylesheet" type="text/css" href="@styleFile" />
|
||||
}
|
||||
Loading…
Reference in new issue