?>

MiniAsset Library Released

For a number of years, I’ve developed the AssetCompress CakePHP plugin. Simultaneously, I’ve maintained similar code at FreshBooks. To make both code bases better, and give non-CakePHP projects the ability to leverage the tool chain that AssetCompress provides, I decided to make a new standalone library – MiniAsset . This library, only depends on some CLI helpers, and provides core functionality of AssetCompress.

What MiniAsset does

Mini Asset is a small footprint library that provide tools to assist in building an asset minification/optimization pipeline. It uses a simple INI based configuration file that lets you define output files, that are comprised of a number of input files. Input files can be processed by filters on a per-extension or per file basis. Filters allow you to integrate existing pre-processors and minifiers or build your own.

Other Features

  • Built-in support for LESScss, Sass and CoffeeScript, as well as several minifiers.
  • Powerful and flexible filter system allowing you to add your own minifiers/pre-processors.
  • Simple INI configuration files.
  • Incremental builds that don’t recompile assets when they don’t need to be.
  • Command Line Tools for building and clearing assets.

Documentation

The README gives a quick overview on how to use the library. The wiki has additional documentation on the configuration file and filters.

I feel its stable enough to use in production as it is already in use for cakephp.org, FreshBooks and this site. I hope it can be of some use to you, in your work.

Comments

https://github.com/markstory/mini-asset is an ongoing project?

Vimson on 6/4/15

Vimson: Yes, I’ll be fixing issues and adding features as needed.

mark story on 6/7/15

Have your say: