Saturday, October 10, 2015

Automatic Asset Optimization with Munee

Munee is an asset management tool which can compile LESS, SCSS, or CoffeeScript, manipulate images, minify CSS and JS, and cache assets on the server and client on the fly. It works with PHP 5.3 and newer versions.

Stock photo, folder labeled "Assets"

In this tutorial, we will learn how Munee makes it easy to include assets in templates, how to install it, how it works and how to use it.

Munee is another way to avoid NodeJS in asset management of PHP apps.

Why would you want to use Munee?

Munee aims to make asset management easier. It performs a lot of tasks for us on the fly (i.e., when the asset is requested by the client) which we had to do manually before, thus saving time.

Here are some of the reasons why you may want to use Munee:

  1. We often make small changes to our CSS, LESS, SCSS, JavaScript and CoffeeScript files. Every time we make changes we need to compile and minify them. Munee does this for us on the fly.

  2. There are many shared web hosting servers which don’t have gzip enabled. If you are using Munee, it compresses files using PHP, ignoring this restriction.

  3. You don’t have to worry about adding caching directives to .htaccess files. Munee will take care of both server and client side caching of assets.

  4. Munee can manipulate images on the fly and is very handy for responsive web design. You don’t have to maintain different image files for different dimensions.

Continue reading %Automatic Asset Optimization with Munee%


by Narayan Prusty via SitePoint

No comments:

Post a Comment