Skip to content

This site extension minifies html, css, js and potentially (not yet!) images.

License

Notifications You must be signed in to change notification settings

jayramankumar/AzureExtension.FullMinify

 
 

Repository files navigation

Azure Site Extension: FullMinifier

This site extension minifies html, css, js and potentially (not yet!) images.

On startup of the webapp, the default directory (D:\home\site\wwwroot\) is scanned for .js, .html, .css files. The files are then compressed and replaced. If a file is changed during runtime, they will be reprocessed immediately.

This project was greatly inspired by the existing site extension Azure Image Optimizer by Sayed-Ibrahim-Hashimi and Mads Kristensen and is based on the following libaries:

Html Minifier

Zeta Producer Html Compressor, version 1.0.2

A .NET port of Google’s HtmlCompressor library to minify HTML source code.

CSS Minifier

Efficient stylesheet minification in C#

The method takes a string of CSS and returns a minified version of it. The method have been modified for demo purposes, so you might want to optimize the code yourself.

JS Minifier

JSMin.Net, version 1.1.3

JSMin.NET is a .NET port of the Douglas Crockford's JSMin.

Setup

tbd

Configuration

The following can be configured:

The directory that will be scanned for files: minify.path

Default: D:\home\site\wwwroot
Overwrite them in the app setting of the website.

The file extensions of the files that will be minified: minify.extensions

Default: .css;.html;.js Overwrite them in the app setting of the website.

About

This site extension minifies html, css, js and potentially (not yet!) images.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 93.1%
  • Batchfile 3.8%
  • CSS 2.9%
  • JavaScript 0.2%