Skip to content

Commit

Permalink
Merge pull request #1449 from glopesdev/item-template
Browse files Browse the repository at this point in the history
Add source item template for dotnet new
  • Loading branch information
glopesdev authored Jul 3, 2023
2 parents 77bb2c3 + 64c159b commit 75e340d
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Bonsai.Audio/Bonsai.Audio.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Description>Bonsai Audio Library containing modules for sound capture and playback.</Description>
<PackageTags>Bonsai Rx Audio</PackageTags>
<TargetFramework>net462</TargetFramework>
<VersionPrefix>2.7.0</VersionPrefix>
<VersionPrefix>2.8.0</VersionPrefix>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="openal.redist" Version="2.0.7" />
Expand Down
2 changes: 1 addition & 1 deletion Bonsai.Scripting/Bonsai.Scripting.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<PackageTags>Bonsai Rx Scripting</PackageTags>
<UseWindowsForms>true</UseWindowsForms>
<TargetFramework>net462</TargetFramework>
<VersionPrefix>2.7.0</VersionPrefix>
<VersionPrefix>2.8.0</VersionPrefix>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Bonsai.System\Bonsai.System.csproj" />
Expand Down
2 changes: 1 addition & 1 deletion Bonsai.System.Design/Bonsai.System.Design.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<PackageTags>Bonsai Rx Reactive Extensions IO Resources Design</PackageTags>
<UseWindowsForms>true</UseWindowsForms>
<TargetFramework>net462</TargetFramework>
<VersionPrefix>2.7.0</VersionPrefix>
<VersionPrefix>2.8.0</VersionPrefix>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Bonsai.Design\Bonsai.Design.csproj" />
Expand Down
2 changes: 1 addition & 1 deletion Bonsai.System.Tests/Bonsai.System.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<IsPackable>false</IsPackable>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<TargetFramework>net462</TargetFramework>
<VersionPrefix>2.7.0</VersionPrefix>
<VersionPrefix>2.8.0</VersionPrefix>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Bonsai",
"classifications": [ "Bonsai", "Source" ],
"description": "A class used to create a simple Bonsai observable source",
"identity": "Bonsai.SourceTemplate",
"name": "Bonsai Source",
"tags": {
"language": "C#",
"type": "item"
},
"sources": [
{
"modifiers": [
{
"exclude": [
"**/[Bb]in/**",
"**/[Oo]bj/**",
"**/[Pp]roperties/**",
"**/*.ico",
"**/*.vstemplate",
"Bonsai.SourceTemplate.csproj"
]
}
]
}
],
"symbols": {
"itemName": {
"type": "derived",
"valueSource": "name",
"valueTransform": "safe_name",
"replaces": "$safeitemname$",
"fileRename": "SourceTemplate"
},
"namespace": {
"type": "bind",
"binding": "msbuild:RootNamespace",
"replaces": "$rootnamespace$"
}
},
"constraints": {
"csharp-only": {
"type": "project-capability",
"args": "CSharp"
}
},
"shortName": "bonsaisource",
"defaultName": "Source1",
"preferDefaultName": true
}
3 changes: 2 additions & 1 deletion Bonsai.Templates/Bonsai.Templates.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<PackageType>Template</PackageType>
<PackageVersion>2.7.0</PackageVersion>
<PackageVersion>2.8.0</PackageVersion>
<PackageId>Bonsai.Templates</PackageId>
<Title>Bonsai Templates</Title>
<Authors>Bonsai</Authors>
Expand All @@ -17,6 +17,7 @@
<ItemGroup>
<Content Include="Bonsai.EnvironmentTemplate\**\*" />
<Content Include="Bonsai.PackageTemplate\**\*" Exclude="**\**\bin\**;**\**\obj\**;**\**\Properties\**;**\*.ico;**\*.user;**\*.vstemplate;**\Bonsai.PackageTemplate.csproj" />
<Content Include="Bonsai.SourceTemplate\**\*" Exclude="**\**\bin\**;**\**\obj\**;**\**\Properties\**;**\*.ico;**\*.user;**\*.vstemplate;**\*.csproj" />
<Compile Remove="**\*" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion Bonsai.Vision.Design/Bonsai.Vision.Design.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<PackageTags>Bonsai Rx Vision Visualizers</PackageTags>
<UseWindowsForms>true</UseWindowsForms>
<TargetFramework>net462</TargetFramework>
<VersionPrefix>2.7.0</VersionPrefix>
<VersionPrefix>2.8.0</VersionPrefix>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="OpenTK.GLControl" Version="3.1.0" />
Expand Down

0 comments on commit 75e340d

Please sign in to comment.