ComponentBuilder.Templates 0.2.0

dotnet new install ComponentBuilder.Templates::0.2.0                
This package contains a .NET Template Package you can call from the shell/command line.

ComponentBuilder.Templates

A blazor component solution template to help you create a razor library and online demo site

Quick start

  • Install Template
dotnet new install ComponentBuilder.Templates

You can create by dotnet cli or Visual Studio

  • Create Template via by dotnet cli
dotnet new blazor-sln -n {Your Component Library Name}

via by Visual Studio vs.jpg

Solution Structures

- {YourRazorLibrary}
    |- doc
        |- {YourRazorLibrary}.Docs.ServerSideHost //host by Blazor-Server
            |- Pages
                |- _Host.cshtml
                |- _Layout.cshtml
            |- _Imports.razor
            |- appsettings.json
            |- Program.cs
        |- {YourRazorLibrary}.Docs.Shared
            |- wwwroot
                |- docs.css     //document css
                |- favicon.ico
            |- Components   //Component for your document
            |- Layouts
                |- MainLayout.razor //An empty layout
            |- Pages    //Put your page here
                |- IndexPage.razor  //Name your demo page with `Page` suffix
            |- _Imports.razor
            |- App.razor
        |- {YourRazorLibrary}.Docs.WebAssemblyHost
            |- wwwroot
                |- index.html
            |- _Imports.razor
            |- Program.cs
    |- src
        |- {YourRazorLibrary}   //This is your component library
            |- wwwroot
                |- {YourRazorLibrary}.css   //Component css if need
                |- {YourRazorLibrary}.js    //Component javascript if need
            |- Components   //Put your razor component here
                |- Div.cs   // A sample component
            |- _Imports.razor
            |- DependencyInjectionExtensions.cs
            |- Using.cs //global using
        |- {YourRazorLibrary}.Test  //Unit Test for your component library
            |- DivTest.cs   //A sample unit test for Div component
            |- TestBase.cs  //A test base for UT
            |- Using.cs

TargetFramework Support

.net6 .net7

  • net6.0

    • No dependencies.
  • net7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.2.0 974 3/16/2023
0.1.0 344 12/29/2022