Skip to content

Commit

Permalink
Add a new Nuget Package Project Template (#503)
Browse files Browse the repository at this point in the history
* Add NuGet Package Template
* Add preview image and link to main README
* Rename from ReadMe.html to TODO.html
* Allow NuGet package signing on Ubuntu and MacOS
* Update .editorconfig file
* Use dotnet tool manifest file for Cake.Tool
  • Loading branch information
RehanSaeed authored Jan 29, 2020
1 parent bb6039f commit c348970
Show file tree
Hide file tree
Showing 49 changed files with 2,256 additions and 40 deletions.
6 changes: 3 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Version: 1.3.2 (Using https://semver.org/)
# Updated: 2019-08-04
# Version: 1.4.0 (Using https://semver.org/)
# Updated: 2020-01-28
# See https://github.com/RehanSaeed/EditorConfig/releases for release notes.
# See https://github.com/RehanSaeed/EditorConfig for updates to this file.
# See http://EditorConfig.org for more information about .editorconfig files.
Expand Down Expand Up @@ -161,7 +161,7 @@ csharp_style_deconstructed_variable_declaration = true:warning
csharp_style_pattern_local_over_anonymous_function = true:warning
csharp_using_directive_placement = inside_namespace:warning
csharp_prefer_static_local_function = true:warning
csharp_prefer_simple_using_statement = false:warning
csharp_prefer_simple_using_statement = true:suggestion

##########################################
# .NET Formatting Conventions
Expand Down
23 changes: 11 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,21 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.101
- name: 'Dotnet Tool Restore'
run: dotnet tool restore
shell: pwsh
- name: 'Dotnet Cake Build'
uses: ecampidoglio/[email protected]
with:
target: Build
run: dotnet cake --target=Build
shell: pwsh
- name: 'Dotnet Cake InstallDeveloperCertificate'
uses: ecampidoglio/[email protected]
with:
target: InstallDeveloperCertificate
run: dotnet cake --target=InstallDeveloperCertificate
shell: pwsh
- name: 'Dotnet Cake Test'
uses: ecampidoglio/[email protected]
with:
target: Test
run: dotnet cake --target=Test
shell: pwsh
- name: 'Dotnet Cake Pack'
uses: ecampidoglio/[email protected]
with:
target: Pack
run: dotnet cake --target=Pack
shell: pwsh
- name: 'Publish Artefacts'
uses: actions/[email protected]
with:
Expand Down
2 changes: 1 addition & 1 deletion Docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The ASP.NET Core API project template contains the following features:

## Optional Feature Selection

The ASP.NET Core API project template uses `dotnet new` to enable you to turn features of the project template on or off. Literally everything can be turned on or off with the click of a button for a truly personalized project. Find out more about `dotnet new` [here](http://rehansaeed.com/custom-project-templates-using-dotnet-new/).
The ASP.NET Core API project template uses `dotnet new` to enable you to turn features of the project template on or off. Find out more about `dotnet new` [here](http://rehansaeed.com/custom-project-templates-using-dotnet-new/).

#### API

Expand Down
2 changes: 1 addition & 1 deletion Docs/GraphQL.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The ASP.NET Core GraphQL project template contains the following features:

## Optional Feature Selection

The ASP.NET Core GraphQL project template uses `dotnet new` to enable you to turn features of the project template on or off. Literally everything can be turned on or off with the click of a button for a truly personalized project. Find out more about `dotnet new` [here](http://rehansaeed.com/custom-project-templates-using-dotnet-new/).
The ASP.NET Core GraphQL project template uses `dotnet new` to enable you to turn features of the project template on or off. Find out more about `dotnet new` [here](http://rehansaeed.com/custom-project-templates-using-dotnet-new/).

#### GraphQL

Expand Down
59 changes: 59 additions & 0 deletions Docs/NuGet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
![.NET Boxed Banner](https://media.githubusercontent.com/media/Dotnet-Boxed/Templates/master/Images/Banner.png)

![NuGet Package Boxed Preview Image](https://media.githubusercontent.com/media/Dotnet-Boxed/Templates/master/Images/Orleans-Preview.png)

## Optional Feature Selection

The NuGet package project template uses `dotnet new` to enable you to turn features of the project template on or off. Find out more about `dotnet new` [here](http://rehansaeed.com/custom-project-templates-using-dotnet-new/).

#### Project

- **Title** - The name of the project which determines the assembly product name.
- **Description** - A description of the project which determines the assembly description.
- **Author** - The name of the author of the project which determines the assembly author and copyright information.
- **Tags** - A semi-colon `;` delimited list of tags for the NuGet package.
- **Contact** - The contact details to use if someone wants to contact you about a security vulnerability or code of conduct issues.
- **DotnetCore** - Sets .NET Core as one of the target frameworks.
- **DotnetFramework** - Sets .NET Framework as one of the target frameworks.
- **ReadMe** - Add a README.md markdown file describing the project.
- **EditorConfig** - Add a .editorconfig file to set a fixed code style.
- **License** - The legal license applied to the source code in this project.
- **MIT** - The MIT license.
- **None** - No license, the source code cannot be legally shared.
- **TreatWarningsAsErrors** - Treat warnings as errors.
- **StyleCop** - Adds and enforces StyleCop analysers.
- **Tests** - Adds a unit test project.

#### Source Control

- **Git** - Add a .gitignore file to stop Git from checking in temporary files and a .gitattributes to use git LFS.
- **SourceControl** - Select which source control provider you are using if any, to add provider specific features.
- **GitHub** - Adds .github directory containing a code of conduct, contributing guide, pull request template and issue templates.
- **None** - No source control provider is being used.
- **GitHubUsername** - Your GitHub username or organisation name that the project lives under.
- **GitHubProject** - The name of your GitHub project.

#### Continuous Integration (CI)

- **AppVeyor** - Adds AppVeyor continuation integration build file appveyor.yml.
- **AzurePipelines** - Adds Azure Pipelines continuation integration build file azure-pipelines.yml.
- **GitHubActions** - Adds GitHub Actions continuation integration build file .github/workflow/build.yml.

## Always On Features

- **Signing** - The package is signed. However, you should change the .pfx file.
- **SourceLink** - During debugging, you can step into code from your NuGet package using [Source Link](https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/sourcelink).

## How can I get it?

1. Install the latest [.NET Core SDK](https://dot.net).
2. Run `dotnet new --install Boxed.Templates` to install the project template.
3. Run `dotnet new nuget --help` to see how to select the feature of the project.
5. Run `dotnet new nuget --name "MyProject"` along with any other custom options to create a project from the template.

## Release Notes and To-Do List
You can find release notes for each version [here](https://github.com/Dotnet-Boxed/Templates/releases) and a To-Do list of new features and enhancements coming soon in the [projects](https://github.com/Dotnet-Boxed/Templates/projects) tab.

## Contributing

Please view the [Contributing](/.github/CONTRIBUTING.md) guide for more information.
2 changes: 1 addition & 1 deletion Docs/Orleans.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

## Optional Feature Selection

The [Microsoft Orleans](https://dotnet.github.io/orleans/) project template uses `dotnet new` to enable you to turn features of the project template on or off. Literally everything can be turned on or off with the click of a button for a truly personalized project. Find out more about `dotnet new` [here](http://rehansaeed.com/custom-project-templates-using-dotnet-new/).
The [Microsoft Orleans](https://dotnet.github.io/orleans/) project template uses `dotnet new` to enable you to turn features of the project template on or off. Find out more about `dotnet new` [here](http://rehansaeed.com/custom-project-templates-using-dotnet-new/).

#### Project

Expand Down
3 changes: 3 additions & 0 deletions Images/NuGet-Preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 15 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
![.NET Boxed Banner](https://media.githubusercontent.com/media/Dotnet-Boxed/Templates/master/Images/Banner.png)
![.NET Boxed Banner](Images/Banner.png)

[![Boilerplate.Templates NuGet Package](https://img.shields.io/nuget/v/Boxed.Templates.svg)](https://www.nuget.org/packages/Boxed.Templates/) [![Boxed.Templates package in dotnet-boxed feed in Azure Artifacts](https://feeds.dev.azure.com/dotnet-boxed/_apis/public/Packaging/Feeds/03bd56a4-9269-43f7-9f75-d82037c56a46/Packages/d253caa8-4749-4cc9-892d-1342497a439e/Badge)](https://dev.azure.com/dotnet-boxed/Templates/_packaging?_a=package&feed=03bd56a4-9269-43f7-9f75-d82037c56a46&package=d253caa8-4749-4cc9-892d-1342497a439e&preferRelease=true) [![Twitter URL](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/RehanSaeedUK) [![Twitter Follow](https://img.shields.io/twitter/follow/rehansaeeduk.svg?style=social&label=Follow)](https://twitter.com/RehanSaeedUK)

Project templates with batteries included, providing the minimum amount of code required to get you going.

## Project Templates

### [ASP.NET Core API Boxed](https://github.com/Dotnet-Boxed/Templates/blob/master/Docs/API.md)
[![ASP.NET Core API Boxed Preview Image](https://media.githubusercontent.com/media/Dotnet-Boxed/Templates/master/Images/API-Preview.png)](https://github.com/Dotnet-Boxed/Templates/blob/master/Docs/API.md)
### [ASP.NET Core GraphQL Boxed](https://github.com/Dotnet-Boxed/Templates/blob/master/Docs/GraphQL.md)
[![ASP.NET Core GraphQL Boxed Preview Image](https://media.githubusercontent.com/media/Dotnet-Boxed/Templates/master/Images/GraphQL-Preview.png)](https://github.com/Dotnet-Boxed/Templates/blob/master/Docs/GraphQL.md)
### [Microsoft Orleans Boxed](https://github.com/Dotnet-Boxed/Templates/blob/master/Docs/Orleans.md)
[![Microsoft Orleans Boxed Preview Image](https://media.githubusercontent.com/media/Dotnet-Boxed/Templates/master/Images/Orleans-Preview.png)](https://github.com/Dotnet-Boxed/Templates/blob/master/Docs/Orleans.md)
### [ASP.NET Core API Boxed](Docs/API.md)
[![ASP.NET Core API Boxed Preview Image](Images/API-Preview.png)](Docs/API.md)

### [ASP.NET Core GraphQL Boxed](Docs/GraphQL.md)
[![ASP.NET Core GraphQL Boxed Preview Image](Images/GraphQL-Preview.png)](Docs/GraphQL.md)

### [Microsoft Orleans Boxed](Docs/Orleans.md)
[![Microsoft Orleans Boxed Preview Image](Images/Orleans-Preview.png)](Docs/Orleans.md)

### [NuGet Package Boxed](Docs/NuGet.md)
[![NuGet Package Boxed Preview Image](Images/NuGet-Preview.png)](Docs/Orleans.md)

## How can I get it?

1. Install the latest [.NET Core SDK](https://dot.net).
2. Run `dotnet new --install Boxed.Templates` to install the project template.
3. Run `dotnet new api --help` to see how to select the feature of the project.
2. Run `dotnet new --install Boxed.Templates` to install the project templates.
3. Choose a project template i.e. `api`, `graphql`, `nuget`, `orleans`.
4. Run `dotnet new api --help` to see how to select the feature of the project.
5. Run `dotnet new api --name "MyProject"` along with any other custom options to create a project from the template.

## Release Notes and To-Do List
Expand Down
6 changes: 3 additions & 3 deletions Source/ApiTemplate/.editorconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Version: 1.3.2 (Using https://semver.org/)
# Updated: 2019-08-04
# Version: 1.4.0 (Using https://semver.org/)
# Updated: 2020-01-28
# See https://github.com/RehanSaeed/EditorConfig/releases for release notes.
# See https://github.com/RehanSaeed/EditorConfig for updates to this file.
# See http://EditorConfig.org for more information about .editorconfig files.
Expand Down Expand Up @@ -161,7 +161,7 @@ csharp_style_deconstructed_variable_declaration = true:warning
csharp_style_pattern_local_over_anonymous_function = true:warning
csharp_using_directive_placement = inside_namespace:warning
csharp_prefer_static_local_function = true:warning
csharp_prefer_simple_using_statement = false:warning
csharp_prefer_simple_using_statement = true:suggestion

##########################################
# .NET Formatting Conventions
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion Source/Boxed.Templates.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<PropertyGroup Label="Package">
<VersionPrefix>3.0.0</VersionPrefix>
<VersionPrefix>4.0.0</VersionPrefix>
<Title>.NET Boxed Project &amp; Item Templates</Title>
<Authors>Muhammad Rehan Saeed (RehanSaeed.com)</Authors>
<Description>Project templates with batteries included, providing the minimum amount of code required to get you going.</Description>
Expand Down
6 changes: 3 additions & 3 deletions Source/GraphQLTemplate/.editorconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Version: 1.3.2 (Using https://semver.org/)
# Updated: 2019-08-04
# Version: 1.4.0 (Using https://semver.org/)
# Updated: 2020-01-28
# See https://github.com/RehanSaeed/EditorConfig/releases for release notes.
# See https://github.com/RehanSaeed/EditorConfig for updates to this file.
# See http://EditorConfig.org for more information about .editorconfig files.
Expand Down Expand Up @@ -161,7 +161,7 @@ csharp_style_deconstructed_variable_declaration = true:warning
csharp_style_pattern_local_over_anonymous_function = true:warning
csharp_using_directive_placement = inside_namespace:warning
csharp_prefer_static_local_function = true:warning
csharp_prefer_simple_using_statement = false:warning
csharp_prefer_simple_using_statement = true:suggestion

##########################################
# .NET Formatting Conventions
Expand Down
File renamed without changes.
Loading

0 comments on commit c348970

Please sign in to comment.