Cleaned up

This commit is contained in:
2024-07-07 23:37:17 +02:00
parent 9c3e2a25c0
commit 2d4bdbceeb
13 changed files with 16 additions and 71 deletions

View File

@@ -0,0 +1,5 @@
bin/
obj/
templates/
!templates/.gitkeep
MycroForge.Package.PluginTemplate.sln

View File

@@ -0,0 +1,28 @@
<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/nuget/create-packages/package-authoring-best-practices -->
<PackageId>MycroForge.PluginTemplate.Package</PackageId>
<PackageVersion>1.0</PackageVersion>
<Title>A template for generating MycroForge plugins</Title>
<Authors>Donné Napo</Authors>
<Description>Template to use when creating a plugin for the MycroForge CLI.</Description>
<PackageTags>dotnet-new;templates;</PackageTags>
<PackageProjectUrl>https://git.devdisciples.com/devdisciples/mycroforge</PackageProjectUrl>
<PackageType>Template</PackageType>
<TargetFramework>net8.0</TargetFramework>
<IncludeContentInPack>true</IncludeContentInPack>
<IncludeBuildOutput>false</IncludeBuildOutput>
<ContentTargetFolders>content</ContentTargetFolders>
<NoWarn>$(NoWarn);NU5128</NoWarn>
<NoDefaultExcludes>true</NoDefaultExcludes>
</PropertyGroup>
<ItemGroup>
<Content Include="templates\**\*" Exclude="templates\**\bin\**;templates\**\obj\**"/>
<Compile Remove="**\*"/>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,15 @@
### Used resources
https://www.youtube.com/watch?v=XzD-95qfWJM
https://www.youtube.com/watch?v=rdWZo5PD9Ek
https://learn.microsoft.com/en-us/dotnet/core/tutorials/cli-templates-create-template-package?pivots=dotnet-8-0
### Build the package
`dotnet pack`
### Push to local nuget
`dotnet nuget push bin/Release/MycroForge.PluginTemplate.Package.1.0.0.nupkg --source devdisciples`
### Install template package from local nuget
`dotnet new install MycroForge.PluginTemplate.Package --nuget-source devdisciples`

View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
rm -rf templates/MycroForge.PluginTemplate
cp -R ../MycroForge.PluginTemplate templates/MycroForge.PluginTemplate
dotnet pack