Skip to content

Commit

Permalink
Merge pull request #7214 from omahs/patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
MiYanni authored Nov 1, 2023
2 parents a1994ec + 5bb026d commit 17d2894
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The key packages are:

`dotnet new` CLI is now located in [dotnet/sdk](https://github.com/dotnet/sdk/tree/main/src/Cli/Microsoft.TemplateEngine.Cli) repo.

The issues for `dotnet new` CLI UX should be opened in the that repository.
The issues for `dotnet new` CLI UX should be opened in that repository.

### Template Content Repositories

Expand Down
6 changes: 3 additions & 3 deletions docs/Available-Symbols-Generators.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ This is a sample of definition of a generated symbol, the `port` generator, that
},
```

Most of the generators need to be configured via parameters that let you select the source of the data and select among the options available. Below is a sample of a symbol that use the `now` generator to replace a fixed year indication present in the source files with the current year.
Most of the generators need to be configured via parameters that let you select the source of the data and select among the options available. Below is a sample of a symbol that uses the `now` generator to replace a fixed year indication present in the source files with the current year.

```json
"copyrightYear": {
Expand Down Expand Up @@ -643,14 +643,14 @@ This sample will rename folder called `Api` into `Source/Api/Microsoft/Visual St

`Program.cs`:
```C#
// This file is generated for platfrom: SupportedPlatforms
// This file is generated for platform: SupportedPlatforms
```

This sample will expand and join values of `Platform` argument and replace `SupportedPlatforms` string with `MacOS, iOS`:

`Program.cs`:
```C#
// This file is generated for platfrom: MacOS, iOS
// This file is generated for platform: MacOS, iOS
```

### Related
Expand Down
8 changes: 4 additions & 4 deletions docs/Conditional-processing-and-comment-syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

## Introduction

To add conditional, or dynamic, content you can add Template Engine expressions in your source files. The conditional expression let you to include or exclude part of the file according to a specified condition, and to do this you can use the familiar conditional expressions like **#if**, **#else**, **#elseif**, **#endif**.
To add conditional, or dynamic, content you can add Template Engine expressions in your source files. The conditional expression lets you include or exclude part of the file according to a specified condition, and to do this you can use the familiar conditional expressions like **#if**, **#else**, **#elseif**, **#endif**.

To learn more about conditional expressions evaluation go to [Conditions](Conditions.md) description.

Expand Down Expand Up @@ -310,7 +310,7 @@ The first expression is not emitted because it is processed, and the condition e
## JSON Files

For .json files, the comment block starts with `//` or `////` to the end of the line. After this marker you can add the conditional expressions.
The choice between `//` or `////` is very important because let you choose between different actions to be executed when the condition is met: in the first case the content in the expression is simply rendered into the output files as is, while in the second a different action can be excuted, by default uncommenting removing an eventual leading `//`.
The choice between `//` or `////` is very important because it lets you choose between different actions to be executed when the condition is met: in the first case the content in the expression is simply rendered into the output files as is, while in the second a different action can be executed, by default uncommenting removing an eventual leading `//`.

#### File Extensions

Expand Down Expand Up @@ -399,7 +399,7 @@ MSBuild files, in addition to the `#if`, `#else`, `#elseif`, `#endif` inside an

### Samples

In this sample, one **<TargetFramework>** element will be added according to the value of the **TargetFrameworkOverride** symbol. This syntax is more clear and let you to use a single conditional expression to rule the inclusion of a whole block of content inside the template
In this sample, one **<TargetFramework>** element will be added according to the value of the **TargetFrameworkOverride** symbol. This syntax is more clear and lets you use a single conditional expression to rule the inclusion of a whole block of content inside the template

```xml
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netcoreapp2.0</TargetFramework>
Expand All @@ -416,7 +416,7 @@ In this sample, we can see that if the **TargetFrameworkOverride** symbol is def
</ItemGroup>
```

In this snippet of MSBuild file, we see usage of conditional expression embeded inside a xml comment.
In this snippet of MSBuild file, we see usage of conditional expression embedded inside a xml comment.

```xml
<!--#if (IndividualLocalAuth && UseLocalDB) -->
Expand Down
4 changes: 2 additions & 2 deletions docs/Reference-for-template.json.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ the `template.json` file. This requires that a few changes have to be done on th
```

The templates can be packaged to a NuGet package for further distribution.
A tutorial on how to create the template package can be find [here](https://learn.microsoft.com/en-us/dotnet/core/tutorials/cli-templates-create-template-package).
A tutorial on how to create the template package can be found [here](https://learn.microsoft.com/en-us/dotnet/core/tutorials/cli-templates-create-template-package).


|Category|Description|
Expand All @@ -37,7 +37,7 @@ A tutorial on how to create the template package can be find [here](https://lear
|`author`|The author of the template|no|
|<a name="classifications"></a>`classifications`| Zero or more characteristics of the template which are shown in the tabular output of `dotnet new list` and `dotnet new search` as "Tags". It is possible to filter the templates based on them using `--tag` option. In Visual Studio those items are shown in New Project Dialog in the available list of templates together with template name, description and language. Common classifications are: `Library`, `Test`, `Web` etc. |no|
|`name`|The name for the template. This is displayed as the template name when using `dotnet new` and Visual Studio.|yes|
|`groupIdentity`|The ID of the group this template belongs to. This allows multiple templates to be displayed as one, with the the decision for which one to use based on the template options. |no|
|`groupIdentity`|The ID of the group this template belongs to. This allows multiple templates to be displayed as one, with the decision for which one to use based on the template options. |no|
|`tags`|You can use tags to improve the metadata of your project. Well-known tags are: `language` and `type`. To specify the template language, use the tag `language`. To specify the template type, use the tag `type`. Supported types are: `project`, `item`, `solution`.|no|
|`shortName`|A name for selecting the template in CLI environment. This is the name shown as `Short Name` in `dotnet new` list of templates, and is the name to use to run this template. It is possible to specify multiple short names for the single template, and then any of them can be used to instantiate the template. The first element of the array is considered as the primary and first choice in scenarios where only single value is allowed (for example in tab completion of `dotnet new`). Be mindful when selecting the short name and using synonyms to avoid conflicts with other templates - the template short name should be unique. In case multiple template with the same short name are installed at the same time, the user won't be able to use any of them until one of the packages is uninstalled making the short name unique again. This doesn't apply for the templates that are part of the same group (have same `groupIdentity`). |yes|
|`postActions`|Enables actions to be performed after the project is created. See [the article](Post-Action-Registry.md) on post actions for more details.|no|
Expand Down

0 comments on commit 17d2894

Please sign in to comment.