IconTrim 0.1.4

dotnet add package IconTrim --version 0.1.4
                    
NuGet\Install-Package IconTrim -Version 0.1.4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="IconTrim" Version="0.1.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="IconTrim" Version="0.1.4" />
                    
Directory.Packages.props
<PackageReference Include="IconTrim" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add IconTrim --version 0.1.4
                    
#r "nuget: IconTrim, 0.1.4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package IconTrim@0.1.4
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=IconTrim&version=0.1.4
                    
Install as a Cake Addin
#tool nuget:?package=IconTrim&version=0.1.4
                    
Install as a Cake Tool

IconTrim

IconTrim scans application files for Bootstrap Icons references and generates a smaller WOFF2 font with matching CSS.

dotnet add package IconTrim

The package brings IconTrim.Core, IconTrim.BootstrapIcons, IconTrim.FontTools, and IconTrim.Hosting through NuGet dependencies. Font generation requires an external Python installation with FontTools and Brotli support. IconTrim discovers a usable interpreter automatically; set FontToolsOptions.PythonExecutable to choose one explicitly.

The package targets net8.0 as its minimum and supports .NET 8 and later applications. The solution tests and an ASP.NET Core consumer have been validated on .NET 8; a .NET 10 consumer also passed restore, build, and font generation.

using IconTrim.BootstrapIcons.DependencyInjection;
using IconTrim.Core.DependencyInjection;
using IconTrim.FontTools.DependencyInjection;
using IconTrim.Hosting.DependencyInjection;

builder.Services.AddIconTrim(options =>
{
    options.BasePath = Path.GetFullPath(builder.Environment.ContentRootPath);
    options.Scan.Roots.Add(".");
    options.Scan.IconPrefix = "bi-";
    options.Font.SourceFontPath = "wwwroot/lib/bootstrap-icons/fonts/bootstrap-icons.woff2";
    options.Output.CssPath = "wwwroot/css/bootstrap-icons.subset.css";
    options.Output.FontDirectory = "wwwroot/fonts";
    options.Output.FontUrlPrefix = "/fonts";
    options.Output.AssetPrefix = "bootstrap-icons";
})
.AddBootstrapIcons(options => options.CssPath = "wwwroot/lib/bootstrap-icons/bootstrap-icons.min.css")
.AddFontTools();

builder.Services.AddIconTrimOnStartup();

See the repository README for CLI, configuration, and incremental execution details.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.

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.1.4 139 10/22/2026
0.1.3 171 9/29/2026
0.1.2 151 9/28/2026
0.1.1 152 9/28/2026
0.1.0 156 9/28/2026

Preserve existing CSS and WOFF2 files when generation produces identical content, including after rebuilding incremental state. Remove the generated CSS timestamp and explicitly preserve font timestamps in FontTools.