Blazor.CliTool
0.2.1
dotnet tool install --global Blazor.CliTool --version 0.2.1
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local Blazor.CliTool --version 0.2.1
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Blazor.CliTool&version=0.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package Blazor.CliTool --version 0.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Blazor.CliTool
A simple Cli tool that can be installed to enable easily generating Blazor components in an Angular CLI fashion:
Installation
Run the following command to install globally on your machine:
dotnet tool install Blazor.CliTool --global
Usage
- Open the directory in which you want to generate the component
- For Visual Studio 2022 you can right-click the directory and click 'Open in Terminal'.
- For Visual Studio Code you can right-click the directory and click 'Open in integrated terminal'
- Run one of the commands:
blazor component ComponentName- Generates a component with the nameComponentNamein the current directory.
Configuration
You are able to add a blazor-tool.json file anywhere in your file system tree.
The first occurence in the folder where you execute this, or any of its parents, will be used as configuration for the tool.
This allows you to put this file in the root of projects, repositories or file systems to determine the scope of the configuration.
All configurations are optional, an example of the configuration looks as follows:
{
"$schema": "https://raw.githubusercontent.com/sandervanteinde/Blazor.CliTool/main/schema/v1/schema.json",
"namespace": "file", // option between 'file' and 'block', being either file-scoped namespaces (.NET 6+) or block scoped. Defaults to whatever your projects supports, unless overwritten here.
"generateInFolder": false, // option to generate files in an additional folder. E.g.: `blazor component Test` would create the component as follows: `/Test/Test.razor.cs`. Defaults to `false`.
"styleSheetExtension": "css" // option to overwrite the stylesheet you want to generate. Defaults to `css`.
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.