Gets packaging scripts and partial views working and fixes packaging stylesheets and cleans things up a bit.

This commit is contained in:
Shannon
2021-07-08 13:11:39 -06:00
parent f7d0e417d6
commit 5a1a24556e
23 changed files with 871 additions and 615 deletions

View File

@@ -1,4 +1,4 @@
using Umbraco.Cms.Core.Mapping;
using Umbraco.Cms.Core.Mapping;
using Umbraco.Cms.Core.Models.ContentEditing;
namespace Umbraco.Cms.Core.Models.Mapping
@@ -8,9 +8,14 @@ namespace Umbraco.Cms.Core.Models.Mapping
public void DefineMaps(IUmbracoMapper mapper)
{
mapper.Define<IStylesheet, EntityBasic>((source, context) => new EntityBasic(), Map);
mapper.Define<IPartialView, CodeFileDisplay>((source, context) => new CodeFileDisplay(), Map);
mapper.Define<IScript, CodeFileDisplay>((source, context) => new CodeFileDisplay(), Map);
mapper.Define<IStylesheet, CodeFileDisplay>((source, context) => new CodeFileDisplay(), Map);
mapper.Define<IPartialView, EntityBasic>((source, context) => new EntityBasic(), Map);
mapper.Define<IPartialView, CodeFileDisplay>((source, context) => new CodeFileDisplay(), Map);
mapper.Define<IScript, EntityBasic>((source, context) => new EntityBasic(), Map);
mapper.Define<IScript, CodeFileDisplay>((source, context) => new CodeFileDisplay(), Map);
mapper.Define<CodeFileDisplay, IPartialView>(Map);
mapper.Define<CodeFileDisplay, IScript>(Map);
@@ -27,6 +32,28 @@ namespace Umbraco.Cms.Core.Models.Mapping
target.Path = source.Path;
}
// Umbraco.Code.MapAll -Trashed -Udi -Icon
private static void Map(IScript source, EntityBasic target, MapperContext context)
{
target.Alias = source.Alias;
target.Id = source.Id;
target.Key = source.Key;
target.Name = source.Name;
target.ParentId = -1;
target.Path = source.Path;
}
// Umbraco.Code.MapAll -Trashed -Udi -Icon
private static void Map(IPartialView source, EntityBasic target, MapperContext context)
{
target.Alias = source.Alias;
target.Id = source.Id;
target.Key = source.Key;
target.Name = source.Name;
target.ParentId = -1;
target.Path = source.Path;
}
// Umbraco.Code.MapAll -FileType -Notifications -Path -Snippet
private static void Map(IPartialView source, CodeFileDisplay target, MapperContext context)
{