lightgear/asset — pull request #4 by bradleyboy (2013-12-07 17:32:48+00:00)
Title: Add 'combine_by_group' option

Thanks for this excellent package. One problem we ran into was that we had a few distinct areas of our application that needed different asset groups. But, we also wanted to take advantage of the `combine` option. As it is now, this creates one single combined file for the entire application, including all groups. This commit introduces an opt-in option that will rendered the combined assets by group instead.

Old behavior:

```php
Asset::register(
array(
'css/core/reset.css',
'css/core/style.less',
), array('group' => 'core')
);

Asset::register(
array(
'css/core/reset.css',
'css/site/style.less',
), array('group' => 'site')
);

Asset::styles('core');
//

Asset::styles('site');
//
```

The rendered combined style would only include the last group (`site` in this case).

New behavior:

```php
Asset::register(
array(
'css/core/reset.css',
'css/core/style.less',
), array('group' => 'core')
);

Asset::register(
array(
'css/core/reset.css',
'css/site/style.less',
), array('group' => 'site')
);

Asset::styles('core');
//

Asset::styles('site');
//
```