PHPackages                             simkimsia/asset\_compress - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. simkimsia/asset\_compress

ActiveCakephp-plugin[Utility &amp; Helpers](/categories/utility)

simkimsia/asset\_compress
=========================

v0.8(13y ago)0263MITPHPPHP &gt;=5.3.0

Since Mar 10Pushed 12y ago1 watchersCompare

[ Source](https://github.com/simkimsia/asset_compress)[ Packagist](https://packagist.org/packages/simkimsia/asset_compress)[ Docs](https://github.com/markstory/asset_compress)[ RSS](/packages/simkimsia-asset-compress/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

Asset Compress
==============

[](#asset-compress)

Asset Compress is CakePHP plugin for helping reduce the number of requests, and optimizing the remaining requests your application makes for Javascript and CSS files.

### Features

[](#features)

- Development mode builder that rebuilds assets on each request.
- Command line build tool to compile static assets for deployment.
- 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 configuration file.
- Incremental builds that don't recompile assets when they don't need to be.

Installing
----------

[](#installing)

Clone or download the plugin into one of your plugin paths. Then make sure you load the plugin:

```
// in app/Config/bootstrap.php
CakePlugin::load('AssetCompress', array('bootstrap' => true));

```

You should make sure to load the plugin **after** configuring other dispatcher filters as the following will replace the configuration added by AssetCompress. For example using the default bootstrap.php, you should end up with something like:

```
// in app/Config/bootstrap.php
Configure::write('Dispatcher.filters', array(
	'AssetDispatcher',
	'CacheDispatcher'
));
CakePlugin::load('AssetCompress', array('bootstrap' => true));

```

Copy the `Config/asset_compress.sample.ini` to `App/Config/asset_compress.ini`. From there read the [wiki](http://github.com/markstory/asset_compress/wiki) for more information.

Documentation
-------------

[](#documentation)

Documentation for AssetCompress is available on the [github wiki pages](http://github.com/markstory/asset_compress/wiki)

Issues
------

[](#issues)

Please report any issues you have with the plugin to the [issue tracker](http://github.com/markstory/asset_compress/issues) on github.

License
-------

[](#license)

Asset Compress is offered under an [MIT license](http://www.opensource.org/licenses/mit-license.php).

Copyright
---------

[](#copyright)

2010-2012 Mark Story ()

### Authors

[](#authors)

See the [github contributors list](https://github.com/markstory/asset_compress/graphs/contributors)

### Changelog

[](#changelog)

#### 0.8

[](#08)

*Backwards Incompatible Changes:*

- AssetCompress requires at least CakePHP 2.3.0. CakePHP 2.3.0 added type hints to Dispatcher filters. While this version will work with CakePHP 2.2.x it will trigger E\_STRICT errors.

*Other Changes*

- Added the Hogan filter. This provides precompilation for mustache templates.

#### 0.7

[](#07)

*Backwards Incompatible Changes:*

- AssetCompress requires at least CakePHP 2.2.0. As of 0.7 the controller has been replaced by a dispatcher filter, which requires CakePHP 2.2.0.

*Other changes:*

- Import paths are now set for the less filter.
- `ROOT/` no longer needs // to work correctly.
- `paths[]` can now contain remote URL's allowing you to create build files using assets on CDN's or other remote hosts.
- `paths[]` can now be defined inside a build target. This lets you only scan certain paths for specific builds. Or when you might have duplicate file names that should not be shared between builds.

#### 0.6

[](#06)

*Backwards Incompatible Changes:*

- `baseUrl` now only takes effect when debug = 0. Build file existence is not checked anymore. It is assumed that build files exist at the location specified in `baseUrl`. Because of this `baseUrl` will need to include the directory names as well.
- Removed `General.writeCache`. It made for more complex deployments. Instead `General.alwaysEnableController` has been added to allow the controller to be used in production instead of pre-generated static files. The default value is *off*.

*Other changes:*

- Support for CakePHP 2.0.
- Added `TimestampImage` filter class. This filter provides the ability to timestamp background images used in CSS files. This is useful for cache busting CSS sprites or other CSS background images.
- Added `ROOT/` path variable for use in configuration files.
- Added `ScssFilter`
- Added support for plugin asset Using the `p:PluginName:resource.xx`syntax.

#### 0.5

[](#05)

*Backwards Incompatible Changes*

- Ini file flag General.debug was removed. Instead Configure::read('debug') is used. This means one less configuration option to manage. Use debug = 1 to test output filters.
- The timestamp file format has changed. Remember to clear all builds when upgrading.
- A number of internal API changes have been made. If you are using the internals of AssetCompress you may have to update your code.
- The `General.timestampFile` config option was removed. Timestamp files are always used now.

*Other changes*

- Ini file naming for build files made simpler. Instead of having to prefix sections with the extension you can omit the prefix. The extension will be read off of the build file name. Instead of `js_library.js` you can just use `library.js` as the build name.
- Controller/view javascript files are now combined into minified asset automatically now.
- When using the shell, asset targets that are still fresh will be skipped on subsequent builds. A target is fresh if the build file's mtime is later than all of the files that go into the target. This behavior can be ignored using the `-force` option.
- If you don't define the `paths[]` keys in your js and css extensions, AssetCompress will recursively include all paths in the standard CakePHP directories.
- Theme support has been added. When defining a build you can set `theme = true` in the build definition. When the shell is run, a build will be created for every theme installed. Themes support only works for builds defined in the ini file.
- The timestamp file format has changed and contains timestamps for each build. This was required as part of the incremental builds feature.

#### 0.4

[](#04)

*Backwards Incompatible Changes*

- Internals of the plugin re-factored and re-architected to be simpler.
- New configuration file format.
- Helper method changes, creating builds on the fly now works differently.
- Comment stripping features removed, you should use one of the built-in minifier integrations to accomplish this.
- Sprockets features and InlineImport feature extracted into filters.
- Helper methods changed.

*Other changes*

- CoffeeScript, and LESS css support added.
- Can add any additional attributes to generated link or stylesheet tags.

#### 0.3

[](#03)

*Backwards incompatible changes*

- Inflection of file names for javascript and css was removed. This affects both the helper, and the directives supported by each file type.
- Auto inclusion of all build files in the `afterRender()` callback was removed. You now need to manually call `includeAssets()`.
- The default build file is now a magic-hash. Magic-hash build files, use the `md5()` of their components as the build filename. This allows you to easily create build files without worrying about keeping them unique across your application.

*Other changes*

- `AssetCompressHelper::includeAssets()` takes an array of build files you wish to output in that call. This lets you place some build files at the top of the document, and others at the bottom.
- `AssetCompressHelper::includeJs()` and `AssetCompressHelper::includeCss()` were added. These methods function similar to `includeAssets()`. Each allows you to only include some of the build files.
- Assets that do not exist now return 404 errors.
- Two basic filters have been added. `JsMin` and `CssMin` are now built-in filters. Both require you to put their libraries in `app/vendors`.
- Filters for YUI Compressor have been added. Both a CSS and Javascript filter have been added. They require you to put yuicompressor in your app's vendors directories.
- The asset\_compress shell can now generate build files. This allows you to integrate asset generation into your deployment/build scripts.

#### 0.2

[](#02)

- Timestampping of build files was added.
- Filters for CSS files were fixed.
- Location for asset\_compress.ini file was moved into `app/config/asset_compres.ini`.
- Files in themes should now be auto discovered.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 78.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4843d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/93ee83726396b2c3518ef1d0040223d0474f340e5903c1356503fbda058bb65f?d=identicon)[kimsia](/maintainers/kimsia)

---

Top Contributors

[![markstory](https://avatars.githubusercontent.com/u/24086?v=4)](https://github.com/markstory "markstory (363 commits)")[![Phally](https://avatars.githubusercontent.com/u/112639?v=4)](https://github.com/Phally "Phally (21 commits)")[![evilbloodydemon](https://avatars.githubusercontent.com/u/39753?v=4)](https://github.com/evilbloodydemon "evilbloodydemon (18 commits)")[![renan](https://avatars.githubusercontent.com/u/28046?v=4)](https://github.com/renan "renan (16 commits)")[![rynop](https://avatars.githubusercontent.com/u/372730?v=4)](https://github.com/rynop "rynop (8 commits)")[![fullybaked](https://avatars.githubusercontent.com/u/527122?v=4)](https://github.com/fullybaked "fullybaked (7 commits)")[![afolgado](https://avatars.githubusercontent.com/u/1505996?v=4)](https://github.com/afolgado "afolgado (6 commits)")[![lorenzo](https://avatars.githubusercontent.com/u/37621?v=4)](https://github.com/lorenzo "lorenzo (5 commits)")[![thomseddon](https://avatars.githubusercontent.com/u/747138?v=4)](https://github.com/thomseddon "thomseddon (3 commits)")[![dinhani](https://avatars.githubusercontent.com/u/1139781?v=4)](https://github.com/dinhani "dinhani (3 commits)")[![yourivdlans](https://avatars.githubusercontent.com/u/64841?v=4)](https://github.com/yourivdlans "yourivdlans (2 commits)")[![zeroasterisk](https://avatars.githubusercontent.com/u/23422?v=4)](https://github.com/zeroasterisk "zeroasterisk (1 commits)")[![CauanCabral](https://avatars.githubusercontent.com/u/83092?v=4)](https://github.com/CauanCabral "CauanCabral (1 commits)")[![jmillerdesign](https://avatars.githubusercontent.com/u/848523?v=4)](https://github.com/jmillerdesign "jmillerdesign (1 commits)")[![josegonzalez](https://avatars.githubusercontent.com/u/65675?v=4)](https://github.com/josegonzalez "josegonzalez (1 commits)")[![majna](https://avatars.githubusercontent.com/u/38710?v=4)](https://github.com/majna "majna (1 commits)")[![nojimage](https://avatars.githubusercontent.com/u/100564?v=4)](https://github.com/nojimage "nojimage (1 commits)")[![rchavik](https://avatars.githubusercontent.com/u/39490?v=4)](https://github.com/rchavik "rchavik (1 commits)")[![ReplicaObscura](https://avatars.githubusercontent.com/u/277977?v=4)](https://github.com/ReplicaObscura "ReplicaObscura (1 commits)")[![shama](https://avatars.githubusercontent.com/u/99604?v=4)](https://github.com/shama "shama (1 commits)")

---

Tags

cakephpminifiersasslessassetscoffee-script

### Embed Badge

![Health badge](/badges/simkimsia-asset-compress/health.svg)

```
[![Health](https://phpackages.com/badges/simkimsia-asset-compress/health.svg)](https://phpackages.com/packages/simkimsia-asset-compress)
```

###  Alternatives

[markstory/asset_compress

An asset compression plugin for CakePHP. Provides file concatenation and a flexible filter system for preprocessing and minification.

3701.1M15](/packages/markstory-asset-compress)[markstory/mini-asset

An asset compression library. Provides file concatenation and a flexible filter system for preprocessing and minification.

63770.7k3](/packages/markstory-mini-asset)[ishanvyas22/asset-mix

Asset Mix plugin for CakePHP

3376.4k2](/packages/ishanvyas22-asset-mix)[scssphp/scssphp

scssphp is a compiler for SCSS written in PHP.

62929.3M290](/packages/scssphp-scssphp)[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.3k10](/packages/helsingborg-stad-municipio)[trentrichardson/cakephp-shrink

Compiles, combines, and minifies javascript, coffee, less, scss, and css

1619.4k](/packages/trentrichardson-cakephp-shrink)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
