2020-03-31 14:53:20 +02:00
|
|
|
|
using Umbraco.Core;
|
2020-03-24 17:34:34 +01:00
|
|
|
|
using Umbraco.Core.Composing;
|
|
|
|
|
|
using Umbraco.Core.Runtime;
|
2020-04-02 17:41:00 +11:00
|
|
|
|
using Umbraco.Core.WebAssets;
|
2020-03-24 17:34:34 +01:00
|
|
|
|
|
2020-03-31 15:36:25 +02:00
|
|
|
|
namespace Umbraco.Web.Common.RuntimeMinification
|
2020-03-24 17:34:34 +01:00
|
|
|
|
{
|
2020-03-30 21:27:35 +02:00
|
|
|
|
public sealed class SmidgeComposer : IComposer
|
2020-03-24 17:34:34 +01:00
|
|
|
|
{
|
2020-03-30 21:27:35 +02:00
|
|
|
|
public void Compose(Composition composition)
|
2020-03-24 17:34:34 +01:00
|
|
|
|
{
|
2020-04-03 13:16:01 +11:00
|
|
|
|
|
|
|
|
|
|
// TODO: For this to work we need to have services.AddSmidge() based on the Smidge APIs but our composer APIs don't really let us do that
|
|
|
|
|
|
// This makes it a bit awkward to boot the runtime since that call would need to be made outside of the composer... .hrm...
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-04-03 01:08:52 +11:00
|
|
|
|
composition.RegisterUnique<IRuntimeMinifier, SmidgeRuntimeMinifier>();
|
|
|
|
|
|
composition.RegisterUnique<SmidgeHelperAccessor>();
|
2020-03-24 17:34:34 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|