mirror of https://github.com/abpframework/abp.git
9 changed files with 127 additions and 41 deletions
@ -0,0 +1,16 @@ |
|||
using System.Collections.Generic; |
|||
|
|||
namespace Volo.Abp.Bundling |
|||
{ |
|||
public class BundleDefinition |
|||
{ |
|||
public string Source { get; set; } |
|||
public Dictionary<string, string> AdditionalProperties { get; set; } |
|||
|
|||
public BundleDefinition(string source) |
|||
{ |
|||
Source = source; |
|||
AdditionalProperties = new Dictionary<string, string>(); |
|||
} |
|||
} |
|||
} |
|||
@ -1,12 +1,10 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
using System.Collections.Generic; |
|||
|
|||
namespace Volo.Abp.Bundling |
|||
{ |
|||
public interface IBundleContributer |
|||
{ |
|||
void AddScripts(List<string> scripts); |
|||
void AddStyles(List<string> styles); |
|||
void AddScripts(List<BundleDefinition> scriptDefinitions); |
|||
void AddStyles(List<BundleDefinition> styleDefinitions); |
|||
} |
|||
} |
|||
|
|||
@ -1,18 +1,26 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Collections.Generic; |
|||
using Volo.Abp.Bundling; |
|||
|
|||
namespace Volo.Abp.Http.Client.IdentityModel.WebAssembly |
|||
{ |
|||
public class BundleContributer : IBundleContributer |
|||
{ |
|||
public void AddScripts(List<string> scripts) |
|||
public void AddScripts(List<BundleDefinition> scriptDefinitions) |
|||
{ |
|||
scripts.AddIfNotContains("_content/Microsoft.AspNetCore.Components.WebAssembly.Authentication/AuthenticationService.js"); |
|||
var scripts = new string[] |
|||
{ |
|||
"_content/Microsoft.AspNetCore.Components.WebAssembly.Authentication/AuthenticationService.js", |
|||
}; |
|||
|
|||
foreach (var script in scripts) |
|||
{ |
|||
scriptDefinitions.AddIfNotContains((item) => item.Source == script, () => new BundleDefinition(script)); |
|||
} |
|||
} |
|||
|
|||
public void AddStyles(List<string> styles) |
|||
public void AddStyles(List<BundleDefinition> styleDefinitions) |
|||
{ |
|||
|
|||
} |
|||
} |
|||
} |
|||
|
|||
Loading…
Reference in new issue