Skip to content
This repository has been archived by the owner on Oct 10, 2019. It is now read-only.

Installation

neilime edited this page Aug 30, 2016 · 1 revision

Main Setup

By cloning project

  1. Install the lessphp fork, Minify by cloning them into ./vendor/.
  2. Clone this project into your ./vendor/ directory.

With composer

  1. Add this project in your composer.json:

    "require": {
        "neilime/zf2-assets-bundle": "dev-master"
    }
  2. Now tell composer to download AssetsBundle by running the command:

    $ php composer.phar update

Post installation

  1. Enabling it in your application.config.phpfile.

    <?php
    return array(
        'modules' => array(
            // ...
            'AssetsBundle',
            // ...
        ),
        // ...
    );

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.

  1. 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();
Clone this wiki locally