forked from nkast/MonoGame
-
-
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
21 changed files
with
236 additions
and
0 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
...tes/dotnetTemplates/Create a template package for dotnet new - .NET - Microsoft Learn.url
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,2 @@ | ||
[InternetShortcut] | ||
URL=https://learn.microsoft.com/en-us/dotnet/core/tutorials/cli-templates-create-template-package?pivots=dotnet-8-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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dotnet new install .\ |
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,4 @@ | ||
<!-- Provide an overview of what your template package does and how to get started. | ||
Consider previewing the README before uploading (https://learn.microsoft.com/en-us/nuget/nuget-org/package-readme-on-nuget-org#preview-your-readme). --> | ||
|
||
|
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 @@ | ||
dotnet new uninstall .\ |
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 @@ | ||
"C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\devenv.exe" /updateconfiguration |
Binary file added
BIN
+441 Bytes
...t/ContentPipelineExtension.NetStandard.CSharp/.template.config/TemplateIcon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions
4
...plates/content/ContentPipelineExtension.NetStandard.CSharp/.template.config/ide.host.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,4 @@ | ||
{ | ||
"$schema": " https://json.schemastore.org/ide.host", | ||
"icon": "TemplateIcon.png", | ||
} |
14 changes: 14 additions & 0 deletions
14
...plates/content/ContentPipelineExtension.NetStandard.CSharp/.template.config/template.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 @@ | ||
{ | ||
"$schema": "http://json.schemastore.org/template", | ||
"author": "KNI Engine", | ||
"classifications": [ "Common", "Console" ], | ||
"identity": "nkast.Kni.ContentPipelineExtension.CSharp", | ||
"name": "KNI Content Pipeline Extension Project (.NetStandard)", | ||
"shortName": "KniContentPipelineExtensionNetStandard", | ||
"sourceName": "KniContentPipelineExtension", | ||
"tags": { | ||
"language": "C#", | ||
"type": "project" | ||
}, | ||
"icon": "TemplateIcon.png" | ||
} |
34 changes: 34 additions & 0 deletions
34
...s/dotnetTemplates/content/ContentPipelineExtension.NetStandard.CSharp/ContentImporter1.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,34 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Text; | ||
using Microsoft.Xna.Framework.Content.Pipeline; | ||
|
||
using TInput = System.String; | ||
using TOutput = System.String; | ||
|
||
namespace KniContentPipelineExtension | ||
{ | ||
/// <summary> | ||
/// This class will be instantiated by the XNA Framework Content Pipeline | ||
/// to import a file from disk into the specified type, TImport. | ||
/// | ||
/// This should be part of a Content Pipeline Extension Library project. | ||
/// | ||
/// TODO: change the ContentImporter attribute to specify the correct file | ||
/// extension, display name, and default processor for this importer. | ||
/// </summary> | ||
|
||
[ContentImporter(".xyz", DisplayName = "XYZ Importer", DefaultProcessor = "ContentProcessor1")] | ||
public class ContentImporter1 : ContentImporter<TInput> | ||
{ | ||
|
||
public override TInput Import(string filename, ContentImporterContext context) | ||
{ | ||
// TODO: process the input object, and return the modified data. | ||
throw new NotImplementedException(); | ||
} | ||
|
||
} | ||
|
||
} |
36 changes: 36 additions & 0 deletions
36
...lates/content/ContentPipelineExtension.NetStandard.CSharp/ContentPipelineExtension.csproj
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,36 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<EnableDefaultItems>false</EnableDefaultItems> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<ProjectGuid>{$guid1$}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>KniContentPipelineExtension</RootNamespace> | ||
<AssemblyName>KniContentPipelineExtension</AssemblyName> | ||
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath> | ||
<DefineConstants>$(DefineConstants);</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="nkast.Xna.Framework" Version="3.13.9001" /> | ||
<PackageReference Include="nkast.Xna.Framework.Content" Version="3.13.9001" /> | ||
<PackageReference Include="nkast.Xna.Framework.Graphics" Version="3.13.9001" /> | ||
<PackageReference Include="nkast.Xna.Framework.Content.Pipeline" Version="3.13.9001" /> | ||
<PackageReference Include="nkast.Xna.Framework.Content.Pipeline.Graphics" Version="3.13.9001" /> | ||
<PackageReference Include="nkast.Xna.Framework.Content.Pipeline.Audio" Version="3.13.9001" /> | ||
<PackageReference Include="nkast.Xna.Framework.Content.Pipeline.Media" Version="3.13.9001" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Compile Include="ContentImporter1.cs" /> | ||
<Compile Include="ContentProcessor1.cs" /> | ||
</ItemGroup> | ||
|
||
</Project> |
29 changes: 29 additions & 0 deletions
29
.../dotnetTemplates/content/ContentPipelineExtension.NetStandard.CSharp/ContentProcessor1.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,29 @@ | ||
using System; | ||
using Microsoft.Xna.Framework.Content.Pipeline; | ||
// TODO: replace these with the processor input and output types. | ||
using TInput = System.String; | ||
using TOutput = System.String; | ||
|
||
namespace KniContentPipelineExtension | ||
{ | ||
/// <summary> | ||
/// This class will be instantiated by the XNA Framework Content Pipeline | ||
/// to apply custom processing to content data, converting an object of | ||
/// type TInput to TOutput. The input and output types may be the same if | ||
/// the processor wishes to alter data without changing its type. | ||
/// | ||
/// This should be part of a Content Pipeline Extension Library project. | ||
/// | ||
/// TODO: change the ContentProcessor attribute to specify the correct | ||
/// display name for this processor. | ||
/// </summary> | ||
[ContentProcessor(DisplayName = "KniContentPipelineExtension.ContentProcessor1")] | ||
public class ContentProcessor1 : ContentProcessor<TInput, TOutput> | ||
{ | ||
public override TOutput Process(TInput input, ContentProcessorContext context) | ||
{ | ||
// TODO: process the input object, and return the modified data. | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
...dotnetTemplates/content/ContentPipelineExtension.NetStandard.CSharp/Directory.Build.props
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,4 @@ | ||
<Project> | ||
|
||
</Project> | ||
|
Binary file added
BIN
+453 Bytes
.../dotnetTemplates/content/GameComponent.CSharp/.template.config/TemplateIcon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions
7
Templates/dotnetTemplates/content/GameComponent.CSharp/.template.config/ide.host.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,7 @@ | ||
{ | ||
"$schema": " https://json.schemastore.org/ide.host", | ||
"icon": "TemplateIcon.png", | ||
|
||
"defaultItemExtension": "cs", | ||
"itemHierarchyPaths": [ "Code" ] | ||
} |
23 changes: 23 additions & 0 deletions
23
Templates/dotnetTemplates/content/GameComponent.CSharp/.template.config/template.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,23 @@ | ||
{ | ||
"$schema": "http://json.schemastore.org/template", | ||
"author": "KNI Engine", | ||
"classifications": [ "Common", "Code" ], | ||
"identity": "nkast.Kni.GameComponent.CSharp", | ||
"name": "KNI GameComponent Item", | ||
"shortName": "KniGameComponent", | ||
"tags": { | ||
"language": "C#", | ||
"type": "item" | ||
}, | ||
"symbols": { | ||
"ClassName":{ | ||
"type": "parameter", | ||
"description": "The name of the code file and class.", | ||
"datatype": "text", | ||
"replaces": "GameComponent1", | ||
"fileRename": "GameComponent1", | ||
"defaultValue": "GameComponent1" | ||
} | ||
}, | ||
"icon": "TemplateIcon.png" | ||
} |
29 changes: 29 additions & 0 deletions
29
Templates/dotnetTemplates/content/GameComponent.CSharp/GameComponent1.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,29 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using Microsoft.Xna.Framework; | ||
using Microsoft.Xna.Framework.Audio; | ||
using Microsoft.Xna.Framework.Graphics; | ||
using Microsoft.Xna.Framework.Input; | ||
|
||
namespace KniGameComponent | ||
{ | ||
internal class GameComponent1 : GameComponent | ||
{ | ||
public GameComponent1(Game game) : base(game) | ||
{ | ||
} | ||
|
||
/// <summary>Initializes the component. Used to load non-graphical resources.</summary> | ||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
} | ||
|
||
/// <summary>Update the component.</summary> | ||
/// <param name="gameTime">GameTime of the Game.</param> | ||
public override void Update(GameTime gameTime) | ||
{ | ||
} | ||
|
||
} | ||
} |
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 @@ | ||
dotnet new install .\bin\Release\nkast.Kni.Templates.3.13.9001.nupkg |
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,42 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<!-- The package metadata. Fill in the properties marked as TODO below --> | ||
<!-- Follow the instructions on https://learn.microsoft.com/en-us/nuget/create-packages/package-authoring-best-practices --> | ||
<PackageId>nkast.Kni.Templates</PackageId> | ||
<PackageVersion>3.13.9001</PackageVersion> | ||
<Title>TODO: fill the package name here</Title> | ||
<Authors>KNI Engine</Authors> | ||
<Description>TODO: fill the package description here</Description> | ||
<PackageTags>TODO: fill the tags here</PackageTags> | ||
<PackageProjectUrl>https://github.com/kniEngine/kni/</PackageProjectUrl> | ||
|
||
<!-- Keep package type as 'Template' to show the package as a template package on nuget.org and make your template available in dotnet new search.--> | ||
<PackageType>Template</PackageType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<IncludeContentInPack>true</IncludeContentInPack> | ||
<IncludeBuildOutput>false</IncludeBuildOutput> | ||
<ContentTargetFolders>content</ContentTargetFolders> | ||
<NoWarn>$(NoWarn);NU5128</NoWarn> | ||
<NoDefaultExcludes>true</NoDefaultExcludes> | ||
<PackageReadmeFile>README.md</PackageReadmeFile> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<LocalizeTemplates>false</LocalizeTemplates> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.TemplateEngine.Tasks" Version="*" PrivateAssets="all" IsImplicitlyDefined="true"/> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Content Include="content\**\*" Exclude="content\**\bin\**;content\**\obj\**" /> | ||
<Compile Remove="**\*" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<None Include="README.md" Pack="true" PackagePath="" /> | ||
</ItemGroup> | ||
|
||
</Project> |
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 @@ | ||
dotnet pack |
2 changes: 2 additions & 0 deletions
2
...otnetTemplates/templating-dotnet-template-samples-content at main · dotnet-templating.url
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,2 @@ | ||
[InternetShortcut] | ||
URL=https://github.com/dotnet/templating/tree/main/dotnet-template-samples/content |
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 @@ | ||
dotnet new uninstall nkast.Kni.Templates |