mirror of https://github.com/abpframework/abp.git
6 changed files with 64 additions and 79 deletions
@ -1,26 +1,15 @@ |
|||
using System.Collections.Generic; |
|||
using Volo.Abp.Bundling; |
|||
using Volo.Abp.Bundling; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme |
|||
{ |
|||
public class BundleContributer : IBundleContributer |
|||
public class BundleContributer : BaseBundleContributer |
|||
{ |
|||
public void AddScripts(List<BundleDefinition> scriptDefinitions) |
|||
public override string[] GetStyles() |
|||
{ |
|||
|
|||
} |
|||
|
|||
public void AddStyles(List<BundleDefinition> styleDefinitions) |
|||
{ |
|||
var styles = new string[] |
|||
return new string[] |
|||
{ |
|||
"_content/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/libs/abp/css/theme.css", |
|||
}; |
|||
|
|||
foreach (var style in styles) |
|||
{ |
|||
styleDefinitions.AddIfNotContains((item) => item.Source == style, () => new BundleDefinition(style)); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
@ -1,25 +1,15 @@ |
|||
using System.Collections.Generic; |
|||
using Volo.Abp.Bundling; |
|||
using Volo.Abp.Bundling; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.WebAssembly |
|||
{ |
|||
public class BundleContributer : IBundleContributer |
|||
public class BundleContributer : BaseBundleContributer |
|||
{ |
|||
public void AddScripts(List<BundleDefinition> scriptDefinitions) |
|||
public override string[] GetScripts() |
|||
{ |
|||
var scripts = new string[] |
|||
return new string[] |
|||
{ |
|||
"_content/Volo.Abp.AspNetCore.Components.WebAssembly/libs/abp/js/abp.js", |
|||
}; |
|||
|
|||
foreach (var script in scripts) |
|||
{ |
|||
scriptDefinitions.AddIfNotContains((item) => item.Source == script, () => new BundleDefinition(script)); |
|||
} |
|||
} |
|||
|
|||
public void AddStyles(List<BundleDefinition> styleDefinitions) |
|||
{ |
|||
} |
|||
} |
|||
} |
|||
|
|||
@ -1,37 +1,26 @@ |
|||
using System.Collections.Generic; |
|||
using Volo.Abp.Bundling; |
|||
using Volo.Abp.Bundling; |
|||
|
|||
namespace Volo.Abp.BlazoriseUI |
|||
{ |
|||
public class BundleContributer : IBundleContributer |
|||
public class BundleContributer : BaseBundleContributer |
|||
{ |
|||
public void AddScripts(List<BundleDefinition> scriptDefinitions) |
|||
public override string[] GetStyles() |
|||
{ |
|||
var scripts = new string[] |
|||
{ |
|||
"_content/Blazorise/blazorise.js", |
|||
"_content/Blazorise.Bootstrap/blazorise.bootstrap.js" |
|||
}; |
|||
|
|||
foreach (var script in scripts) |
|||
{ |
|||
scriptDefinitions.AddIfNotContains((item) => item.Source == script, () => new BundleDefinition(script)); |
|||
} |
|||
} |
|||
|
|||
public void AddStyles(List<BundleDefinition> styleDefinitions) |
|||
{ |
|||
var styles = new string[] |
|||
return new string[] |
|||
{ |
|||
"_content/Blazorise/blazorise.css", |
|||
"_content/Blazorise.Bootstrap/blazorise.bootstrap.css", |
|||
"_content/Blazorise.Snackbar/blazorise.snackbar.css" |
|||
}; |
|||
} |
|||
|
|||
foreach (var style in styles) |
|||
public override string[] GetScripts() |
|||
{ |
|||
return new string[] |
|||
{ |
|||
styleDefinitions.AddIfNotContains((item) => item.Source == style, () => new BundleDefinition(style)); |
|||
} |
|||
"_content/Blazorise/blazorise.js", |
|||
"_content/Blazorise.Bootstrap/blazorise.bootstrap.js" |
|||
}; |
|||
} |
|||
} |
|||
} |
|||
|
|||
@ -0,0 +1,38 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
|
|||
namespace Volo.Abp.Bundling |
|||
{ |
|||
public class BaseBundleContributer : IBundleContributer |
|||
{ |
|||
public virtual void AddScripts(List<BundleDefinition> scriptDefinitions) |
|||
{ |
|||
var scripts = GetScripts(); |
|||
|
|||
foreach (var script in scripts) |
|||
{ |
|||
scriptDefinitions.AddIfNotContains((item) => item.Source == script, () => new BundleDefinition(script)); |
|||
} |
|||
} |
|||
|
|||
public virtual void AddStyles(List<BundleDefinition> styleDefinitions) |
|||
{ |
|||
var styles = GetStyles(); |
|||
|
|||
foreach (var style in styles) |
|||
{ |
|||
styleDefinitions.AddIfNotContains((item) => item.Source == style, () => new BundleDefinition(style)); |
|||
} |
|||
} |
|||
|
|||
public virtual string[] GetStyles() |
|||
{ |
|||
return Array.Empty<string>(); |
|||
} |
|||
|
|||
public virtual string[] GetScripts() |
|||
{ |
|||
return Array.Empty<string>(); |
|||
} |
|||
} |
|||
} |
|||
@ -1,26 +1,15 @@ |
|||
using System.Collections.Generic; |
|||
using Volo.Abp.Bundling; |
|||
using Volo.Abp.Bundling; |
|||
|
|||
namespace Volo.Abp.Http.Client.IdentityModel.WebAssembly |
|||
{ |
|||
public class BundleContributer : IBundleContributer |
|||
public class BundleContributer : BaseBundleContributer |
|||
{ |
|||
public void AddScripts(List<BundleDefinition> scriptDefinitions) |
|||
public override string[] GetScripts() |
|||
{ |
|||
var scripts = new string[] |
|||
return 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<BundleDefinition> styleDefinitions) |
|||
{ |
|||
|
|||
} |
|||
} |
|||
} |
|||
|
|||
Loading…
Reference in new issue