-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
133 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,11 +16,12 @@ | |
Write-Host $CurrentDir | ||
|
||
Write-Host "Installing Umbraco templates" | ||
dotnet new --install Umbraco.Templates | ||
dotnet new -i Umbraco.Templates::$UmbracoVersion --force | ||
|
||
Write-Host "Creating Umbraco site" | ||
cd $Destination | ||
dotnet new umbraco -n $ProjectName --development-database-type SQLite --version $CmsVersion --friendly-name "Test admin" --email "[email protected]" --password "1234567890" | ||
|
||
dotnet new umbraco -n $ProjectName --development-database-type SQLite --version $CmsVersion --friendly-name "Admin" --email "[email protected]" --password "1234567890" | ||
|
||
cd "$Destination\$ProjectName" | ||
|
||
|
@@ -34,7 +35,7 @@ | |
|
||
$propertyGroup = Select-XML -Xml $xml -XPath '//PropertyGroup[1]' | ||
$newNode = $xml.CreateElement('RestoreAdditionalProjectSources') | ||
$newNode.InnerText = '../Nuget' | ||
$newNode.InnerText = '../nuget' | ||
$propertyGroup.Node.AppendChild($newNode) | ||
$xml.Save("$Destination\$ProjectName\$ProjectName.csproj") | ||
|
||
|
@@ -53,7 +54,7 @@ if (Test-Path -Path $TestSitePath) { | |
Remove-Item -LiteralPath $TestSitePath -Force -Recurse | ||
} | ||
|
||
New-Item -Path $RootDir -Name $TestSitesFolderName -ItemType "directory" | ||
New-Item -Path $RootDir -Name "$TestSitesFolder\$TestProjectName" -ItemType "directory" | ||
|
||
Create-Test-Site $TestSitesFolder $TestProjectName $UmbracoVersion | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
$RootDir = Split-Path -Path $CurrentDir -Parent | ||
$TestSitesFolderName = "testsites" | ||
$TestSitesFolder = "$RootDir\$TestSitesFolderName" | ||
$TestProjectName = "V12" | ||
$TestProjectName = "V13" | ||
$PackageName = "Dawoe.OEmbedPickerPropertyEditor" | ||
$SolutionName = "Dawoe.OEmbedPickerPropertyEditor" | ||
$SourceDir = "$RootDir\src" | ||
$UmbracoVersion = "12.0.0" | ||
$StarterKitVersion = "11.0.0" | ||
$UmbracoVersion = "13.0.0" | ||
$StarterKitVersion = "13.0.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/Dawoe.OEmbedPickerPropertyEditor.Core/Models/OEmbedItemApi.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// <copyright file="OEmbedItemApi.cs" company="Umbraco community"> | ||
// Copyright (c) Dave Woestenborghs and contributors. Licensed under the MIT License. See LICENSE in the project root for license information. | ||
// </copyright> | ||
|
||
using Newtonsoft.Json; | ||
|
||
namespace Dawoe.OEmbedPickerPropertyEditor.Core.Models | ||
{ | ||
internal class OEmbedItemApi : OEmbedItemBase | ||
{ | ||
[JsonProperty(PropertyName = "embedCode")] | ||
public string EmbedCode => this.Preview; | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
src/Dawoe.OEmbedPickerPropertyEditor.Core/Models/OEmbedItemBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// <copyright file="OEmbedItemBase.cs" company="Umbraco community"> | ||
// Copyright (c) Dave Woestenborghs and contributors. Licensed under the MIT License. See LICENSE in the project root for license information. | ||
// </copyright> | ||
|
||
using Newtonsoft.Json; | ||
|
||
namespace Dawoe.OEmbedPickerPropertyEditor.Core.Models | ||
{ | ||
/// <summary> | ||
/// Base class for OEmbed items. | ||
/// </summary> | ||
public abstract class OEmbedItemBase | ||
{ | ||
/// <summary> | ||
/// Gets or sets the url. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "url")] | ||
public string Url { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the width. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "width")] | ||
public int Width { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the height. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "height")] | ||
public int Height { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the preview. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "preview")] | ||
internal string Preview { get; set; } | ||
|
||
/// <inheritdoc /> | ||
public override string ToString() => this.Preview; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters