diff --git a/BootstrapBlazor.Extensions.slnx b/BootstrapBlazor.Extensions.slnx index 93b827a7..c479f482 100644 --- a/BootstrapBlazor.Extensions.slnx +++ b/BootstrapBlazor.Extensions.slnx @@ -103,9 +103,6 @@ - - - @@ -114,4 +111,10 @@ + + + + + + diff --git a/src/tools/BootstrapBlazor.CssBundler/ArgumentsHelper.cs b/tools/BootstrapBlazor.CssBundler/ArgumentsHelper.cs similarity index 73% rename from src/tools/BootstrapBlazor.CssBundler/ArgumentsHelper.cs rename to tools/BootstrapBlazor.CssBundler/ArgumentsHelper.cs index f85a837b..e82b40b6 100644 --- a/src/tools/BootstrapBlazor.CssBundler/ArgumentsHelper.cs +++ b/tools/BootstrapBlazor.CssBundler/ArgumentsHelper.cs @@ -1,4 +1,4 @@ -// Copyright (c) BootstrapBlazor & Argo Zhang (argo@live.ca). All rights reserved. +// Copyright (c) BootstrapBlazor & Argo Zhang (argo@live.ca). All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Website: https://www.blazor.zone or https://argozhang.github.io/ @@ -9,9 +9,9 @@ static class ArgumentsHelper public static void PrintHelp() { Console.ForegroundColor = ConsoleColor.Cyan; - Console.WriteLine("Usage: BootstrapBlazorCssBundler [options]"); + Console.WriteLine("Usage: BootstrapBlazor.CssBundler [options]"); Console.WriteLine("Options:"); - Console.WriteLine(" ConfigFileFullPath D:\\Argo\\src\\BootstrapBlazor\\src\\BootstrapBlazor\\bundler.json"); + Console.WriteLine(" ConfigFileFullPath D:\\src\\BootstrapBlazor\\src\\BootstrapBlazor\\bundler.json"); Console.WriteLine(); Console.ForegroundColor = ConsoleColor.Gray; } diff --git a/src/tools/BootstrapBlazor.CssBundler/BootstrapBlazor.CssBundler.csproj b/tools/BootstrapBlazor.CssBundler/BootstrapBlazor.CssBundler.csproj similarity index 90% rename from src/tools/BootstrapBlazor.CssBundler/BootstrapBlazor.CssBundler.csproj rename to tools/BootstrapBlazor.CssBundler/BootstrapBlazor.CssBundler.csproj index e62f48db..aa1ba360 100644 --- a/src/tools/BootstrapBlazor.CssBundler/BootstrapBlazor.CssBundler.csproj +++ b/tools/BootstrapBlazor.CssBundler/BootstrapBlazor.CssBundler.csproj @@ -1,15 +1,14 @@  - 1.0.1 - Exe + 9.0.0 net9.0 - enable - enable - net9.0 + Exe + enable + enable diff --git a/tools/BootstrapBlazor.CssBundler/BootstrapBlazor.CssBundler.xml b/tools/BootstrapBlazor.CssBundler/BootstrapBlazor.CssBundler.xml new file mode 100644 index 00000000..c7e7decc --- /dev/null +++ b/tools/BootstrapBlazor.CssBundler/BootstrapBlazor.CssBundler.xml @@ -0,0 +1,8 @@ + + + + BootstrapBlazor.CssBundler + + + + diff --git a/src/tools/BootstrapBlazor.CssBundler/Bundler.cs b/tools/BootstrapBlazor.CssBundler/Bundler.cs similarity index 100% rename from src/tools/BootstrapBlazor.CssBundler/Bundler.cs rename to tools/BootstrapBlazor.CssBundler/Bundler.cs diff --git a/src/tools/BootstrapBlazor.CssBundler/BundlerOptions.cs b/tools/BootstrapBlazor.CssBundler/BundlerOptions.cs similarity index 84% rename from src/tools/BootstrapBlazor.CssBundler/BundlerOptions.cs rename to tools/BootstrapBlazor.CssBundler/BundlerOptions.cs index c8569952..0d8984a1 100644 --- a/src/tools/BootstrapBlazor.CssBundler/BundlerOptions.cs +++ b/tools/BootstrapBlazor.CssBundler/BundlerOptions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -17,6 +17,6 @@ public static List LoadFromConfigFile(string configFile) { var json = File.ReadAllText(configFile); - return JsonSerializer.Deserialize>(json, JsonSerializerOptions.Web) ?? new(); + return JsonSerializer.Deserialize>(json, JsonSerializerOptions.Web) ?? []; } } diff --git a/src/tools/BootstrapBlazor.CssBundler/Program.cs b/tools/BootstrapBlazor.CssBundler/Program.cs similarity index 100% rename from src/tools/BootstrapBlazor.CssBundler/Program.cs rename to tools/BootstrapBlazor.CssBundler/Program.cs diff --git a/tools/BootstrapBlazor.CssBundler/logo.png b/tools/BootstrapBlazor.CssBundler/logo.png new file mode 100644 index 00000000..a3029078 Binary files /dev/null and b/tools/BootstrapBlazor.CssBundler/logo.png differ diff --git a/tools/BootstrapBlazor.CssBundler/readme.md b/tools/BootstrapBlazor.CssBundler/readme.md new file mode 100644 index 00000000..5d2a241a --- /dev/null +++ b/tools/BootstrapBlazor.CssBundler/readme.md @@ -0,0 +1,118 @@ +# Bootstrap Blazor Component + +## A set of enterprise-class UI components based on Bootstrap and Blazor. + +[![License](https://img.shields.io/github/license/dotnetcore/bootstrapblazor.svg?logo=git&logoColor=red)](https://github.com/dotnetcore/BootstrapBlazor/blob/main/LICENSE) +[![Github build](https://img.shields.io/github/actions/workflow/status/dotnetcore/BootstrapBlazor/build.yml?branch=main&?label=main&logo=github)](https://github.com/dotnetcore/BootstrapBlazor/actions?query=workflow%3A%22Build+Project%22+branch%3Amain) +[![Repo Size](https://img.shields.io/github/repo-size/dotnetcore/BootstrapBlazor.svg?logo=github&logoColor=green&label=repo)](https://github.com/dotnetcore/BootstrapBlazor) +[![Commit Date](https://img.shields.io/github/last-commit/dotnetcore/BootstrapBlazor/main.svg?logo=github&logoColor=green&label=commit)](https://github.com/dotnetcore/BootstrapBlazor) +[![codecov](https://codecov.io/gh/dotnetcore/BootstrapBlazor/branch/main/graph/badge.svg?token=5SXIWHXZC3)](https://codecov.io/gh/dotnetcore/BootstrapBlazor) + +--- + +## Features +- Enterprise-class UI designed for web applications. +- A set of high-quality Blazor components out of the box. +- Supports WebAssembly-based client-side and SignalR-based server-side UI event interaction. +- Supports Progressive Web Applications (PWA). +- Build with C#, a multi-paradigm static language for an efficient development experience. +- .NET Standard 2.1 based, with direct reference to the rich .NET ecosystem. +- Supports NET5. (Server-Side, WASM) +- Seamless integration with existing ASP.NET Core MVC and Razor Pages projects. + +## Online Examples +[![website](https://img.shields.io/badge/China-https://www.blazor.zone-success.svg?color=red&logo=buzzfeed&logoColor=green)](https://www.blazor.zone) + +## Installation Guide + +- Install .net core sdk [Official website](https://dotnet.microsoft.com/download) +- Install Visual Studio 2019 lastest [Official website](https://visualstudio.microsoft.com/vs/getting-started/) + +```shell +git clone https://github.com/dotnetcore/BootstrapBlazor.git +cd BootstrapBlazor/src/BootstrapBlazor.Server +dotnet run +``` + +## Create a new project from the dotnet new template + +1. Install the template + +`dotnet new install Bootstrap.Blazor.Templates::*` + +2. Create the Boilerplate project with the template + +`dotnet new bbapp` + +## Install Bootstrap Blazor Project Template + +1. Download Project Template + +Microsoft Market [link](https://marketplace.visualstudio.com/items?itemName=Longbow.BootstrapBlazorUITemplate) + +2. Double Click **BootstrapBlazor.UITemplate.vsix** + +## Import Bootstrap Blazor into an existing project + +1. Go to the project folder of the application and install the Nuget package reference + +`dotnet add package BootstrapBlazor` + +2. **Add** the `stylesheet` `javascripts` file to your main index file - `Pages/_Host.cshtml (Server)` or `wwwroot/index.html (WebAssembly)` + + **HTML** + +``` + + + + . . . + + + + . . . + + + + +``` + +3. Open the `~/Startup.cs` file in the and register the `Bootstrap Blazor` service: + + **C#** + +``` +namespace BootstrapBlazorAppName +{ + public class Startup + { + public void ConfigureServices(IServiceCollection services) + { + //more code may be present here + services.AddBootstrapBlazor(); + } + + //more code may be present here + } +} +``` + +## Visual Studio Integration + +To create a new `Bootstrap Blazor` UI for Blazor application, use the Create New Project Wizard. The wizard detects all installed versions of `Bootstrap Blazor` for Blazor and lists them in the Version combobox—this enables you to start your project with the desired version. You can also get the latest version to make sure you are up to date. + +1. Get the Wizard + +To use the Create New Project Wizard, install the `Bootstrap Blazor` UI for Blazor Visual Studio Extensions. You can get it from the: + +- Visual Studio Marketplace (for Windows) + +2. Start the Wizard + +To start the wizard, use either of the following approaches + +### Using the Project menu: + +- Click File > New > Project. +- Find and click the C# Blazor Application option (you can use the search, or filter by Blazor templates). +- Follow the wizard.