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

Deprecated (16384) : Since 5.1.0: Cache config `_cake_core_` is deprecated. Use `_cake_translations_` instead /opt/markstory-1766784742/vendor/cakephp/cakephp/src/I18n/I18n.php, line: 152 You can disable all deprecation warnings by setting `Error.errorLevel` to `E_ALL & ~E_USER_DEPRECATED`. Adding `vendor/cakephp/cakephp/src/I18n/I18n.php` to `Error.ignoredDeprecationPaths` in your `config/app.php` config will mute deprecations from that file only. [in /opt/markstory-1766784742/vendor/cakephp/cakephp/src/Core/functions.php, line 377]
on 6/4/15

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

mark story on 6/7/15

Comments are not open at this time.