-
Availability to get filters from ServiceManager
<?php 'twitter_bootstrap_css' => array( 'assets' => array( '/path/to/bootstrap/file.less' ), 'filters' => array( 'BootstrapLessCompiler' ), );
<?php // BootstrapLessCompiler filter factory class public function createService(ServiceLocatorInterface $serviceLocator){ $filter = new LessphpFilter(); $defaultPresets = $serviceLocator->get('config'); $defaultPresets = array_merge($defaultPresets['bootstrap_less']['default'], $defaultPresets['bootstrap_less']['application']); $filter->setPresets($defaultPresets); return $filter; }
- Simply front page
- Improve documentation
- Create out of the box configuration
config/assets.config.php.dist
- #29 - pass more arguments to filter constructor
- #74 - now only assets match in request are build
- #80 - In debug mode, asset collection is move as separate file, not as single file.
- use cache buster only when cache is enabled or have cache buster enabled
-
All route configurations that match the current route will now be merged. This is especially useful when used in combination with the regular expressions previously introduced.
<?php return array( 'assetic_configuration' => array( 'routes' => array( 'admin/.*' => array( '@specific_admin_js ), 'admin/(dashboard|reports|etc)/.+' => array( '@admin_css', '@admin_js' ) ) ) );
If now route
admin/page
gets matched by ZF2 only asset@specific_admin_js
is selected. If routeadmin/reports/x
is matched by ZF2 both assets@specific_admin_js
andadmin_css
andadmin_js
get selected.
- Added possibility to specify
regex
in route name. example:
<?php
return array(
'assetic_configuration' => array(
'routes' => array(
// in the name of route there can be any regex.
// it will be automatically prepended by '^' and appended by '$'
// during matching phase
'admin/(dashboard|reports|etc)/.+' => array(
'@admin_css',
'@admin_js'
)
)
)
);
- Asset collections defined on route level can now match the current route using regular expression
- Create console actions, run
php index.php
to see more informations - Option to disable/enable generating assets on fly
'buildOnRequest' => true
- by default is set totrue
for backward compatybility. My recomendation is to set this to false on production enviroment. - Cleanup, refactoring
- Added cache buster strategy
- Start tagging releases
- Optional filters in debug mode
- Added configurable umask
- Added configurable acceptable errors #54
- Update description how to merge
- Change behavior for option "baseUrl" now is detected by ZF2 (in ServiceFactory::createService)
- New configuration option "basePath"
- Composer is now recommended way of installation.
- Fix issue #36: Case insesitive module name in configuration required
- Fix issue #30: Possible Assets may apply where they are not wanted
- Wrote tests
- Add travis-ci
- Remove old code
- Add AsseticBundleServiceAwareInterface
- Composer support added, now is recommended way of installation
- Remove vendor directory
- New installation process
- Rewrite AsseticBundle\Service to determinate how to set up template to use resources (link, script) depending on Zend\View\Renderer
- Assetic configuration namespace was change from:
array(
'di' => array(
'instance' => array(
'assetic-configuration' => array(
'parameters' => array(
'config' => array(/* configuration */)
)
)
)
)
);
to:
array('assetic_configuration' => array(/* configuration */));