diff --git a/docs/en/CLI.md b/docs/en/CLI.md index 1ad283ed78..c24dedae62 100644 --- a/docs/en/CLI.md +++ b/docs/en/CLI.md @@ -45,7 +45,7 @@ Here, is the list of all available commands before explaining their details: * **`login`**: Authenticates on your computer with your [abp.io](https://abp.io/) username and password. * **`login-info`**: Shows the current user's login information. * **`logout`**: Logouts from your computer if you've authenticated before. -* **`bundle`**: Generates script and style references for an ABP Blazor project. +* **`bundle`**: Generates script and style references for ABP Blazor and MAUI Blazor project. * **`install-libs`**: Install NPM Packages for MVC / Razor Pages and Blazor Server UI types. ### help @@ -531,7 +531,7 @@ abp logout ### bundle -This command generates script and style references for an ABP Blazor WebAssembly project and updates the **index.html** file. It helps developers to manage dependencies required by ABP modules easily. In order ```bundle``` command to work, its **executing directory** or passed ```--working-directory``` parameter's directory must contain a Blazor project file(*.csproj). +This command generates script and style references for ABP Blazor WebAssembly and MAUI Blazor project and updates the **index.html** file. It helps developers to manage dependencies required by ABP modules easily. In order ```bundle``` command to work, its **executing directory** or passed ```--working-directory``` parameter's directory must contain a Blazor or MAUI Blazor project file(*.csproj). Usage: @@ -543,8 +543,11 @@ abp bundle [options] * ```--working-directory``` or ```-wd```: Specifies the working directory. This option is useful when executing directory doesn't contain a Blazor project file. * ```--force``` or ```-f```: Forces to build project before generating references. +* ```--project-type``` or ```-t```: Specifies the project type. Default type is `webassembly`. Available types: + * `webassembly` + * `maui-blazor` -`bundle` command reads the `appsettings.json` file inside the Blazor project for bundling options. For more details about managing style and script references in Blazor apps, see [Managing Global Scripts & Styles](UI/Blazor/Global-Scripts-Styles.md) +`bundle` command reads the `appsettings.json` file inside the Blazor and MAUI Blazor project for bundling options. For more details about managing style and script references in Blazor or MAUI Blazor apps, see [Managing Global Scripts & Styles](UI/Blazor/Global-Scripts-Styles.md) ### install-libs diff --git a/docs/zh-Hans/CLI.md b/docs/zh-Hans/CLI.md index 77ed762bfd..58aec193a0 100644 --- a/docs/zh-Hans/CLI.md +++ b/docs/zh-Hans/CLI.md @@ -42,6 +42,7 @@ dotnet tool update -g Volo.Abp.Cli * **`login`**: 使用你在[abp.io](https://abp.io/)的用户名和密码在你的计算机上认证. * **`login-info`**: 展示当前登录用户信息. * **`logout`**: 在你的计算机注销认证. +* **`bundle`**: 为 ABP Blazor 和 MAUI Blazor 项目生成引用的脚本和样式. * **`install-libs`**: 为 MVC / Razor Pages 和 Blazor Server UI 类型安装NPM包. ### help @@ -432,6 +433,26 @@ abp login-info abp logout ``` +### bundle + +这个命令为ABP Blazor WebAssembly 和 MAUI Blazor 项目生成引用的脚本和样式并且更新 **index.html** 文件, 它帮助开发者轻松的管理ABP模块的依赖. 为了使 ```bundle``` 命令工作, 它的**执行目录**或者传递 ```--working-directory``` 参数的目录必须包含Blazor或MAUI Blazor项目文件(*.csproj) + +用法: + +````bash +abp bundle [options] +```` + +#### Options + +* ```--working-directory``` 或 ```-wd```: 指定当前执行目录, 这个命令在当前目录不包含项目文件时非常有用. +* ```--force``` 或 ```-f```: 在生成引用之前强制构建项目. +* ```--project-type``` 或 ```-t```: 指定项目类型. 默认类型是 `webassembly`. 可用的类型有: + * `webassembly` + * `maui-blazor` + +`bundle` command reads the `appsettings.json` file inside the Blazor and MAUI Blazor project for bundling options. For more details about managing style and script references in Blazor or MAUI Blazor apps, see [Managing Global Scripts & Styles](UI/Blazor/Global-Scripts-Styles.md) + ### install-libs 为 MVC / Razor Pages 和 Blazor Server UI 类型安装NPM包, 它的 **执行目录** 或者传递的 ```--working-directory``` 目录必须包含一个项目文件(*.csproj). diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs index de02ad773f..7580b7e5be 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs @@ -77,7 +77,8 @@ public class BundlingService : IBundlingService, ITransientDependency FrameworkVersion = frameworkVersion, ProjectFileName = projectName, BundleName = bundleConfig.Name.IsNullOrEmpty() ? "global" : bundleConfig.Name, - Minify = bundleConfig.Mode == BundlingMode.BundleAndMinify + Minify = bundleConfig.Mode == BundlingMode.BundleAndMinify, + ProjectType = projectType }; Logger.LogInformation("Generating style bundle...");