Skip to content

Commit fd63d00

Browse files
committed
Create dotnet new template
1 parent 25c9a04 commit fd63d00

4 files changed

Lines changed: 67 additions & 1 deletion

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.apikey
22
.*/
3+
!.template.config/
34
bin/
45
obj/
56
packages/

.template.config/template.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"$schema": "http://json.schemastore.org/template",
3+
"author": "Brian Lalonde",
4+
"classifications": [ "Console" ],
5+
"name": "PowerShell binary module",
6+
"identity": "PSModuleTemplate.FSharp",
7+
"groupIdentity":"PSModuleTemplate",
8+
"shortName": "psmod",
9+
"tags": {
10+
"language": "F#",
11+
"type":"project"
12+
},
13+
"sourceName": "PSModuleTemplate",
14+
"preferNameDirectory": true,
15+
"defaultName": "PSModuleTemplate",
16+
"sources":[{"exclude": [
17+
"PSModuleTemplate.csproj",
18+
".git/**/*",
19+
".ionide/**/*",
20+
"**/[Bb]in/**",
21+
"**/[Oo]bj/**",
22+
".template.config/**/*",
23+
"**/*.filelist",
24+
"**/*.user",
25+
"**/*.lock.json"
26+
]}],
27+
"symbols":{
28+
"moduleid": {
29+
"type": "generated",
30+
"generator": "guid",
31+
"replaces":"f5c914f0-8410-48a6-8321-6fe8b4e80cf3",
32+
"parameters": {
33+
"format":"N"
34+
}
35+
},
36+
"authorname": {
37+
"type": "parameter",
38+
"defaultValue": "Alan Smithee",
39+
"replaces":"AuthorName"
40+
}
41+
}
42+
}

PSModuleTemplate.csproj

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<PackageType>Template</PackageType>
5+
<PackageVersion>1.0</PackageVersion>
6+
<PackageId>PSModuleTemplate</PackageId>
7+
<Title>PowerShell binary module</Title>
8+
<Authors>Brian Lalonde</Authors>
9+
<Description>A template for creating a binary module for PowerShell.</Description>
10+
<PackageTags>dotnet-new;templates;powershell</PackageTags>
11+
<TargetFramework>netstandard2.0</TargetFramework>
12+
13+
<IncludeContentInPack>true</IncludeContentInPack>
14+
<IncludeBuildOutput>false</IncludeBuildOutput>
15+
<ContentTargetFolders>content</ContentTargetFolders>
16+
</PropertyGroup>
17+
18+
<ItemGroup>
19+
<Content Include="*;src\**\*;docs\*" Exclude="$(MSBuildProjectName).csproj;.git\**\*;.ionide\**\*;src\**\bin\**;src\**\obj\**" />
20+
<Compile Remove="**\*" />
21+
</ItemGroup>
22+
23+
</Project>

src/PSModuleTemplate/PSModuleTemplate.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</Exec>
2525
</Target>
2626

27-
<Target Name="UpdatePlatyPSDocumentation" AfterTargets="CoreCompile">
27+
<Target Name="Documentation" DependsOnTargets="Publish">
2828
<Exec Command='pwsh -nol -noni -nop -c "&amp; { Import-Module (Resolve-Path $(OutputPath)*.psd1); New-MarkdownHelp -Module $(MSBuildProjectName) -OutputFolder ..\..\docs -ea 0; Update-MarkdownHelp ..\..\docs; New-ExternalHelp ..\..\docs -OutputPath . -Force }"'
2929
IgnoreExitCode="true" IgnoreStandardErrorWarningFormat="true" />
3030
</Target>

0 commit comments

Comments
 (0)