Taritsyn / WebMarkupMin

The Web Markup Minifier (abbreviated WebMarkupMin) - a .NET library that contains a set of markup minifiers. The objective of this project is to improve the performance of web applications by reducing the size of HTML, XHTML and XML code.
Apache License 2.0
446 stars 48 forks source link

.NET CLI tool #117

Open zygimantas opened 4 years ago

zygimantas commented 4 years ago

Thank you for this great library. Really useful! Have you considered wrapping it in a dotnet global/local tool so it can be used from CLI to easily compress static files?

Taritsyn commented 4 years ago

Hello, Zygimantas!

Even during the development of version 1.0, I had such plans. At some point, this was no longer necessary, because a BundlerMinifier library appeared. But then authors of the BundlerMinifier library began to use the NUglify instead of the WebMarkupMin.

In general, when there is enough free time, then I will deal with this issue.

zygimantas commented 4 years ago

From my experience, what is related to your middleware functionality, BundlerMinifier is not a replacement for WebMarkupMin. I am just giving my feedback here. There is a gap of Razor Page minimization. All other files are handled by Webpack and plugins (bundling included). But HTML output is quite ugly when used with Razor Pages and the only way I've found to cleanup them is to use WebMarkupMin on origin server behind CDN.

Taritsyn commented 4 years ago

There is a gap of Razor Page minimization. All other files are handled by Webpack and plugins (bundling included). But HTML output is quite ugly when used with Razor Pages and the only way I've found to cleanup them is to use WebMarkupMin on origin server behind CDN.

If you want to minify a cshtml files, then try the Dean Hume's HTML Minifier.