-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathUmbCheckoutStripeManifestFilter.cs
36 lines (34 loc) · 1.3 KB
/
UmbCheckoutStripeManifestFilter.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using UmbCheckout.Shared;
using Umbraco.Cms.Core.Composing;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Manifest;
namespace UmbCheckout.Stripe
{
public class UmbCheckoutStripeManifest : IComposer
{
public void Compose(IUmbracoBuilder builder)
{
builder.ManifestFilters().Append<UmbCheckoutStripeManifestFilter>();
}
}
public class UmbCheckoutStripeManifestFilter : IManifestFilter
{
public void Filter(List<PackageManifest> manifests)
{
manifests.Add(new PackageManifest
{
PackageName = $"{Shared.Consts.PackageName}.{Consts.AppSettingsSectionName}",
Version = UmbCheckoutVersion.Version.ToString(3),
AllowPackageTelemetry = true,
BundleOptions = BundleOptions.None,
Scripts = new []
{
"/App_Plugins/UmbCheckout/js/umbcheckout.stripe.resources.js",
"/App_Plugins/UmbCheckout/js/umbcheckout.stripe.settings.controller.js",
"/App_Plugins/UmbCheckout/js/umbcheckout.stripe.shippingrate.controller.js",
"/App_Plugins/UmbCheckout/js/umbcheckout.stripe.shippingrates.controller.js"
}
});
}
}
}