2017 © Pedro Peláez
 

library assetic-minifier

Assetic Filter for pure PHP JS and CSS minification

image

toopay/assetic-minifier

Assetic Filter for pure PHP JS and CSS minification

  • Sunday, May 18, 2014
  • by toopay
  • Repository
  • 3 Watchers
  • 11 Stars
  • 41,844 Installations
  • PHP
  • 5 Dependents
  • 1 Suggesters
  • 5 Forks
  • 1 Open issues
  • 8 Versions
  • 3 % Grown

The README.md

README

Build Status Dependencies Status, (*1)

Portable Assetic Filter for pure PHP JS and CSS minification., (*2)

Symfony2 configuration

Installation

After installing this package with Composer, add the following line to you AppKernel.php, (*3)

<?php
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Minifier\MinifierBundle(),
            // ...
        );

        return $bundles;
    }
}

Now add the following bit to your config.yml, (*4)

minifier:
    filter:
        name:
            css: ~
            js: ~

This will provide two Assetic filters named minifier_css and minifier_js., (*5)

Usage

The filters can now be used like the following, (*6)

// ::base.html.twig

// ...

{# Minify CSS files #}

{% stylesheets filter='minifier_css' output='css/main.css'
    '@AcmeBundle/Resources/public/css/init.css'
%}
    <link href="{{ asset_url }}" rel="stylesheet" />
{% endstylesheets %}

// ...

{# Minify JS files #}

{% javascripts filter='minifier_js' output='js/scripts.js'
    '@AcmeBundle/Resources/js/scripts.js'
%}
    <script src="{{ asset_url }}"></script>
{% endjavascripts %}

Rename the filters

To overwrite the filters names, simply changes them in your config.yml:, (*7)

minifier:
    filter:
        name:
            css: myCssMinifierFilterName
            js:  myJsMinifierFilterName

The Versions

18/05 2014

dev-master

9999999-dev https://github.com/toopay/assetic-minifier

Assetic Filter for pure PHP JS and CSS minification

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Pascal Thormeier

compression minification

18/05 2014

v1.3.0

1.3.0.0 https://github.com/toopay/assetic-minifier

Assetic Filter for pure PHP JS and CSS minification

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Pascal Thormeier

compression minification

10/03 2014

v1.2.1

1.2.1.0 https://github.com/toopay/assetic-minifier

Assetic Filter for pure PHP JS and CSS minification

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Pascal Thormeier

compression minification

08/03 2014

v1.2.0

1.2.0.0 https://github.com/toopay/assetic-minifier

Assetic Filter for pure PHP JS and CSS minification

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Pascal Thormeier

compression minification

27/10 2013

v1.1.0

1.1.0.0 https://github.com/toopay/assetic-minifier

Assetic Filter for pure PHP JS and CSS minification

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

compression minification

17/03 2013

v1.0.0

1.0.0.0 https://github.com/toopay/assetic-minifier

Assetic Filter for pure PHP JS and CSS minification

  Sources   Download

BSD-3-Clause

The Requires

 

compression minification

06/03 2013

v0.0.2

0.0.2.0 https://github.com/toopay/assetic-minifier

Assetic Filter for pure PHP JS and CSS minification

  Sources   Download

New BSD

The Requires

 

compression minification

27/02 2013

v0.0.1

0.0.1.0 https://github.com/toopay/assetic-minifier

Assetic Filter for pure PHP JS and CSS minification

  Sources   Download

New BSD

The Requires

 

compression minification