Added bundle contributors for npm packages.

pull/301/head
Halil ibrahim Kalkan 7 years ago
parent b3d21f9f67
commit 420c37d42a

@ -0,0 +1,15 @@
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.Core;
using Volo.Abp.Modularity;
namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.Codemirror
{
[DependsOn(typeof(CoreScriptContributor))]
public class CodemirrorScriptContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.Add("/libs/codemirror/codemirror.js");
}
}
}

@ -0,0 +1,12 @@
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.Codemirror
{
public class CodemirrorStyleContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.Add("/libs/codemirror/codemirror.css");
}
}
}

@ -0,0 +1,22 @@
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.Core;
using Volo.Abp.Modularity;
namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.HighlightJs
{
[DependsOn(typeof(CoreScriptContributor))]
public class HighlightJsScriptContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.Add("/libs/highlight.js/highlight.js");
//TODO: Add related languages by configuration (these can be default!)
context.Files.Add("/libs/highlight.js/languages/cs.js");
context.Files.Add("/libs/highlight.js/languages/css.js");
context.Files.Add("/libs/highlight.js/languages/javascript.js");
context.Files.Add("/libs/highlight.js/languages/json.js");
context.Files.Add("/libs/highlight.js/languages/xml.js");
}
}
}

@ -0,0 +1,13 @@
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.HighlightJs
{
public class HighlightJsStyleContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
//TODO: Make this configurable
context.Files.Add("/libs/highlight.js/styles/github.css");
}
}
}

@ -0,0 +1,15 @@
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.Core;
using Volo.Abp.Modularity;
namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.Lodash
{
[DependsOn(typeof(CoreScriptContributor))]
public class LodashScriptContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.Add("/libs/loadash/lodash.min.js");
}
}
}

@ -0,0 +1,15 @@
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.Core;
using Volo.Abp.Modularity;
namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.MarkdownIt
{
[DependsOn(typeof(CoreScriptContributor))]
public class MarkdownItScriptContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.Add("/libs/markdown-it/markdown-it.min.js");
}
}
}

@ -0,0 +1,16 @@
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.Core;
using Volo.Abp.Modularity;
namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.Select2
{
[DependsOn(typeof(CoreScriptContributor))]
public class Select2ScriptContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
//TODO: Add select2.full.min.js or localize!
context.Files.Add("/libs/select2/js/select2.min.js");
}
}
}

@ -0,0 +1,12 @@
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.Select2
{
public class Select2StyleContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.Add("/libs/select2/css/select2.min.css");
}
}
}

@ -0,0 +1,15 @@
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.JQuery;
using Volo.Abp.Modularity;
namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.Timeago
{
[DependsOn(typeof(JQueryScriptContributor))]
public class TimeagoScriptContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.Add("/libs/timeago/jquery.timeago.js");
}
}
}

@ -4,7 +4,10 @@ using Volo.Abp.AspNetCore.Mvc.UI.Packages.DatatablesNetBs4;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.JQuery;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.JQueryForm;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.JQueryValidationUnobtrusive;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.Lodash;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.Select2;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.SweetAlert;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.Timeago;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.Toastr;
using Volo.Abp.Modularity;
@ -13,11 +16,14 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Bundling
[DependsOn(
typeof(JQueryScriptContributor),
typeof(BootstrapScriptContributor),
typeof(LodashScriptContributor),
typeof(JQueryValidationUnobtrusiveScriptContributor),
typeof(JQueryFormScriptContributor),
typeof(DatatablesNetBs4ScriptContributor),
typeof(SweetalertScriptContributor),
typeof(ToastrScriptBundleContributor)
typeof(ToastrScriptBundleContributor),
typeof(TimeagoScriptContributor),
typeof(Select2ScriptContributor)
)]
public class SharedThemeGlobalScriptContributor : BundleContributor
{

@ -2,6 +2,7 @@
using Volo.Abp.AspNetCore.Mvc.UI.Packages.Bootstrap;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.DatatablesNetBs4;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.FontAwesome;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.Select2;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.Toastr;
using Volo.Abp.Modularity;
@ -11,6 +12,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Bundling
typeof(BootstrapStyleContributor),
typeof(FontAwesomeStyleContributor),
typeof(ToastrStyleBundleContributor),
typeof(Select2StyleContributor),
typeof(DatatablesNetBs4StyleContributor)
)]
public class SharedThemeGlobalStyleContributor : BundleContributor

Loading…
Cancel
Save