NMinify 0.0.4

dotnet add package NMinify --version 0.0.4                
NuGet\Install-Package NMinify -Version 0.0.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="NMinify" Version="0.0.4" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NMinify --version 0.0.4                
#r "nuget: NMinify, 0.0.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.
// Install NMinify as a Cake Addin
#addin nuget:?package=NMinify&version=0.0.4

// Install NMinify as a Cake Tool
#tool nuget:?package=NMinify&version=0.0.4                

NMinify

A .NET wrapper for the golang minify library

NuGet version (NMinify) Nuget GitHub Workflow Status GitHub license PR

Installation

To install NMinify, run the following command in the Package Manager Console:

Install-Package NMinify

You can also install NMinify via the .NET CLI by running:

dotnet add package NMinify

Alternatively, you can add NMinify as a dependency in your project's .csproj file:

<ItemGroup>
  <PackageReference Include="NMinify" Version="x.x.x" />
</ItemGroup>

Make sure to replace x.x.x with the latest version available on NuGet.

Once NMinify is installed, you can start using it in your project by adding using NMinify; to the top of your file.

Basic Usage

var text = "<span style=\"color:#ff0000;\" class=\"text\">Some  text</span>";
var minifier = new Minifier();
var minified = minifier.MinifyString("text/html", text);

Console.WriteLine(text);
Console.WriteLine(minified);

Available Methods

Span<byte> MinifyBytes(MinifierMediaType mediaType, ReadOnlySpan<byte> input, Span<byte> output);
string MinifyFile(string mediatype, string input);
string MinifyString(MinifierMediaType mediaType, string input);

License

NMinify is released under the MIT License. This means that you are free to use, modify, and distribute this software as long as you include the original copyright and license notice in your distribution.

Please note that the underlying minify library by tdewolff is also released under the MIT License, and its copyright and license must also be included in any distribution of NMinify.

By using NMinify, you are agreeing to the terms of the MIT License. If you do not agree to these terms, you should not use this software.


Made with stackedit.io, minify and lots of ❤️ in Austria

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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.0.4 217 5/4/2024
0.0.2 352 1/18/2023
0.0.1 257 1/17/2023