Skip to content

Commit 7140688

Browse files
committed
Add contributing.md for Expecto.Template
1 parent 3e1e60f commit 7140688

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

Expecto.Template/CONTRIBUTING.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Contributing
2+
3+
## Updating the template
4+
5+
Updating the template is simple.
6+
In short, [/content/expecto](./content/expecto/) contains the files for the end user.
7+
You can modify these files and it will reflect in the template output.
8+
9+
For example, if you want to update the template framework version, you just edit the `<TargetFramework>`
10+
in [/content/expecto/ExpectoTemplate.fsproj](./content/expecto/ExpectoTemplate.fsproj) just like you would with any other project.
11+
12+
13+
If you want to do more advanced edits, like add a new template, consult the [template authoring docs](https://learn.microsoft.com/en-us/dotnet/core/tutorials/cli-templates-create-template-package)
14+
15+
16+
## Packing
17+
18+
From the Expecto.Template folder, run `dotnet pack`.
19+
You'll probably want to update the PackageVersion first.
20+
21+
22+
## Testing Locally
23+
24+
`dotnet pack` and then `dotnet new install path/to/nupkg/you-just-packed`
25+
26+
## Publishing
27+
28+
```pwsh
29+
$nugetApiKey = 'your-api-key'
30+
rm ./bin/Release/*.nupkg
31+
dotnet pack -c Release -o ./bin/Release/
32+
ls ./bin/Release/*.nupkg |% { dotnet nuget push $_ --source https://api.nuget.org/v3/index.json --api-key $nugetApiKey}
33+
```

0 commit comments

Comments
 (0)