-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Templates 13.1 Messages for upgrade command (#68)
* Added templates for 13.1 * Fixed typo in the upgrade warning message. Added message for "rebuild" after a succesful upgrade * FIxed reference for Telerik.Sitefinity and Telerik.Sitefinity.Services.Events in the .csproj template
- Loading branch information
1 parent
068c44f
commit 5ea80a0
Showing
192 changed files
with
31,427 additions
and
4 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
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
28 changes: 28 additions & 0 deletions
28
Sitefinity CLI/Templates/13.1/CustomWidget/Default/Controller.Template
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,28 @@ | ||
/* {{> sign}} */ | ||
|
||
using {{projectDefaultNamespace}}.Mvc.Models; | ||
using System.Web.Mvc; | ||
using Telerik.Sitefinity.Mvc; | ||
using Telerik.Sitefinity.Personalization; | ||
|
||
namespace {{projectDefaultNamespace}}.Mvc.Controllers | ||
{ | ||
[ControllerToolboxItem(Name = "{{pascalCaseName}}_MVC", Title = "{{name}}", SectionName = "CustomWidgets")] | ||
public class {{pascalCaseName}}Controller : Controller, IPersonalizable | ||
{ | ||
// GET: {{name}} | ||
public ActionResult Index() | ||
{ | ||
var model = new {{pascalCaseName}}Model(); | ||
model.Message = this.Message; | ||
return View(model); | ||
} | ||
|
||
protected override void HandleUnknownAction(string actionName) | ||
{ | ||
this.ActionInvoker.InvokeAction(this.ControllerContext, "Index"); | ||
} | ||
|
||
public string Message { get; set; } | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
Sitefinity CLI/Templates/13.1/CustomWidget/Default/Model.Template
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,12 @@ | ||
/* {{> sign}} */ | ||
|
||
using System.Web.Mvc; | ||
using Telerik.Sitefinity.Mvc; | ||
|
||
namespace {{projectDefaultNamespace}}.Mvc.Models | ||
{ | ||
public class {{pascalCaseName}}Model | ||
{ | ||
public string Message { get; set; } | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
Sitefinity CLI/Templates/13.1/CustomWidget/Default/View.Template
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,6 @@ | ||
@* {{> sign}} *@ | ||
|
||
@model {{projectDefaultNamespace}}.Mvc.Models.{{pascalCaseName}}Model | ||
<div> | ||
@Model.Message | ||
</div> |
14 changes: 14 additions & 0 deletions
14
Sitefinity CLI/Templates/13.1/CustomWidget/Default/templates.json
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 @@ | ||
[ | ||
{ | ||
"FilePath": "Controllers\\{0}Controller.cs", | ||
"TemplatePath": "Controller.Template" | ||
}, | ||
{ | ||
"FilePath": "Models\\{0}Model.cs", | ||
"TemplatePath": "Model.Template" | ||
}, | ||
{ | ||
"FilePath": "Views\\{0}\\Index.cshtml", | ||
"TemplatePath": "View.Template" | ||
} | ||
] |
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,8 @@ | ||
<!-- {{> sign}} --> | ||
|
||
<div class="row" data-sf-element="Row"> | ||
<div class="sf_colsIn col-lg-6" data-sf-element="Column 1" data-placeholder-label="Column 1"> | ||
</div> | ||
<div class="sf_colsIn col-lg-6" data-sf-element="Column 2" data-placeholder-label="Column 2"> | ||
</div> | ||
</div> |
38 changes: 38 additions & 0 deletions
38
Sitefinity CLI/Templates/13.1/IntegrationTests/Default/AssemblyInfo.Template
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,38 @@ | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
using Telerik.WebTestRunner.Server.Attributes; | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("{{pascalCaseName}}")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("SitefinityWebApp.Tests.Integration")] | ||
[assembly: AssemblyCopyright("Copyright © 2020")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Setting ComVisible to false makes the types in this assembly not visible | ||
// to COM components. If you need to access a type in this assembly from | ||
// COM, set the ComVisible attribute to true on that type. | ||
[assembly: ComVisible(false)] | ||
|
||
// The following GUID is for the ID of the typelib if this project is exposed to COM | ||
[assembly: Guid("{{projectGuid}}")] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Build and Revision Numbers | ||
// by using the '*' as shown below: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] | ||
[assembly: IntegrationTests] |
66 changes: 66 additions & 0 deletions
66
Sitefinity CLI/Templates/13.1/IntegrationTests/Default/DemoTests.Template
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,66 @@ | ||
/* {{> sign}} */ | ||
|
||
using MbUnit.Framework; | ||
using System; | ||
|
||
namespace {{pascalCaseName}} | ||
{ | ||
/// <summary> | ||
/// Represents sample integration tests class to demonstrate the usage of some attributes. | ||
/// For more information on creating and running integration tests with Sitefinity CMS web test runner see the Sitefinity documentation: https://www.progress.com/documentation/sitefinity-cms/tutorial-create-integration-tests-with-sitefinity-web-test-runner | ||
/// For sample integration tests see this project in the Sitefinity GitHub repo: https://github.com/Sitefinity/Telerik.Sitefinity.Samples.IntegrationTests | ||
/// For more information on the integration tests infrastructure and framework see the MbUnit documentation: http://www.gallio.org/doku-id-mbunit-documentation/ | ||
/// </summary> | ||
[TestFixture] | ||
[Description("Integration tests project")] | ||
[Author(TestAuthors.SitefinityCLI)] | ||
public class DemoTests | ||
{ | ||
/// <summary> | ||
/// This method is invoked once prior to executing any tests in the fixture. | ||
/// </summary> | ||
[FixtureSetUp] | ||
public void FixtureSetUp() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
/// <summary> | ||
/// This method is invoked once after all tests in the fixture have been executed. | ||
/// </summary> | ||
[FixtureTearDown] | ||
public void FixtureTearDown() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
/// <summary> | ||
/// This method is invoked just before each test method is executed. | ||
/// </summary> | ||
[SetUp] | ||
public void SetUp() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
/// <summary> | ||
/// This method is invoked after each test method. | ||
/// </summary> | ||
public void TearDown() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
/// <summary> | ||
/// Write your integration test | ||
/// </summary> | ||
[Test] | ||
[Category(TestCategories.Demo)] | ||
[Description("Write your integration test")] | ||
[Author(TestAuthors.SitefinityCLI)] | ||
public void Test() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
Sitefinity CLI/Templates/13.1/IntegrationTests/Default/TestAuthors.Template
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,9 @@ | ||
/* {{> sign}} */ | ||
|
||
namespace {{pascalCaseName}} | ||
{ | ||
internal class TestAuthors | ||
{ | ||
public const string SitefinityCLI = "Sitefinity CLI"; | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
Sitefinity CLI/Templates/13.1/IntegrationTests/Default/TestCategories.Template
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,11 @@ | ||
/* {{> sign}} */ | ||
|
||
using MbUnit.Framework; | ||
|
||
namespace {{pascalCaseName}} | ||
{ | ||
public class TestCategories | ||
{ | ||
public const string Demo = "Demo"; | ||
} | ||
} |
53 changes: 53 additions & 0 deletions
53
Sitefinity CLI/Templates/13.1/IntegrationTests/Default/csproj.Template
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,53 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{ {{~projectGuid~}} }</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>{{pascalCaseName}}</RootNamespace> | ||
<AssemblyName>{{pascalCaseName}}</AssemblyName> | ||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<Deterministic>true</Deterministic> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>{{binFolder}}</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>{{binFolder}}</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="Gallio, Version=3.4.0.0, Culture=neutral, PublicKeyToken=eb9cfa67ee6ab36e, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\Sitefinity.Gallio_MbUnit.3.4.11.0\lib\net40\Gallio.dll</HintPath> | ||
</Reference> | ||
<Reference Include="MbUnit, Version=3.4.0.0, Culture=neutral, PublicKeyToken=eb9cfa67ee6ab36e, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\Sitefinity.Gallio_MbUnit.3.4.11.0\lib\net40\MbUnit.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="Microsoft.CSharp" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Net.Http" /> | ||
<Reference Include="System.Xml" /> | ||
<Reference Include="Telerik.WebTestRunner.Server, Version=2.0.0.1, Culture=neutral, PublicKeyToken=b28c218413bdf563, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\Telerik.Sitefinity.WebTestRunner.Server.2.0.0.1\lib\net40\Telerik.WebTestRunner.Server.dll</HintPath> | ||
</Reference> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
</Project> |
5 changes: 5 additions & 0 deletions
5
Sitefinity CLI/Templates/13.1/IntegrationTests/Default/packages.config.Template
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,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="Sitefinity.Gallio_MbUnit" version="3.4.11.0" targetFramework="net472" /> | ||
<package id="Telerik.Sitefinity.WebTestRunner.Server" version="2.0.0.1" targetFramework="net472" /> | ||
</packages> |
26 changes: 26 additions & 0 deletions
26
Sitefinity CLI/Templates/13.1/IntegrationTests/Default/templates.json
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,26 @@ | ||
[ | ||
{ | ||
"FilePath": "Properties\\AssemblyInfo.cs", | ||
"TemplatePath": "AssemblyInfo.Template" | ||
}, | ||
{ | ||
"FilePath": "{0}.csproj", | ||
"TemplatePath": "csproj.Template" | ||
}, | ||
{ | ||
"FilePath": "DemoTests.cs", | ||
"TemplatePath": "DemoTests.Template" | ||
}, | ||
{ | ||
"FilePath": "packages.config", | ||
"TemplatePath": "packages.config.Template" | ||
}, | ||
{ | ||
"FilePath": "TestAuthors.cs", | ||
"TemplatePath": "TestAuthors.Template" | ||
}, | ||
{ | ||
"FilePath": "TestCategories.cs", | ||
"TemplatePath": "TestCategories.Template" | ||
} | ||
] |
37 changes: 37 additions & 0 deletions
37
Sitefinity CLI/Templates/13.1/Module/Default/AssemblyInfo.template
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,37 @@ | ||
using {{pascalCaseName}}; | ||
using System.Reflection; | ||
using System.Runtime.InteropServices; | ||
using Telerik.Sitefinity.Services; | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("{{pascalCaseName}}")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("{{pascalCaseName}}")] | ||
[assembly: AssemblyCopyright("Copyright © 2020")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Setting ComVisible to false makes the types in this assembly not visible | ||
// to COM components. If you need to access a type in this assembly from | ||
// COM, set the ComVisible attribute to true on that type. | ||
[assembly: ComVisible(false)] | ||
|
||
// The following GUID is for the ID of the typelib if this project is exposed to COM | ||
[assembly: Guid("{{projectGuid}}")] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Build and Revision Numbers | ||
// by using the '*' as shown below: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] |
Oops, something went wrong.