-
-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
Emilien Escalle edited this page Jan 8, 2019
·
3 revisions
$ composer require neilime/zf-assets-bundle
Now install needed assets filters dependencies (none are required by default)
- Js :
composer require tedivm/jshrink
(default) orcomposer require mrclay/jsmin-php
- Css :
composer require tubalmartin/cssmin
- Less :
composer require oyejorge/less.php tubalmartin/cssmin
(default) orcomposer require neilime/lessphp tubalmartin/cssmin
- Scss :
composer require leafo/scssphp tubalmartin/cssmin
-
Enabling it in your
application.config.php
file.<?php return array( 'modules' => array( // ... 'AssetsBundle', 'Zend\Mvc\Console', // ... ), // ... );
You should note that as the ordering of modules matters, you should declare the 'AssetsBundle' module before your application modules to ensure the default settings don't take priority.
-
Insert css & js files into your layout page
Into the
<head>
part :echo $this->headScript();
At the bottom of the
<body>
part :echo $this->inlineScript();