2017 © Pedro Peláez
 

kohana-module minify

Minify module for Kohana 3.x

image

kohana-modules/minify

Minify module for Kohana 3.x

  • Thursday, March 3, 2016
  • by pocesar
  • Repository
  • 5 Watchers
  • 54 Stars
  • 57 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 15 Forks
  • 2 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

For Kohana 3.2, use the 3.2 branch, the only thing that changes is the case on the filenames, (*1)

It's a Minify module based on the best minifier for PHP imho > https://github.com/mrclay/minify Extract the contents to 'modules' folder, enable it in the bootstrap:, (*2)

  Kohana::modules(array(
    'minify' => MODPATH.'minify', // Minify
  ));

and the only thing you need to do actually, is to create a subfolder on 'application/cache' called minify, and you're ready to go (otherwise you'll get problems with the file cache). Call it in your HTML files like:, (*3)

  <link href="/min?f=file1.css,file2.css,file3.css&b=/css/" rel="stylesheet">

Don't forget to copy the file modules/minify/config/minify.php to your applications folder in application/config/minify.php

Don't make modifications inside the modules folder

It's already configured with a route called minify, that maps to '/min', and if you don't want to output what is your js or css folder, you can use groups, by specifying it in your /application/config/minify.php file:, (*4)

in PHP:

  return array(
    'groupsConfig' => array(
      'css' => array('//css/file1.css', '//css/file2.css', '//css/file3.css'),
      'js' => array('//js/jquery.js', '//js/modernizr.js', '//js/plugin/orbit.js')
    )
  );

in HTML:

<link href="/min?g=css" rel="stylesheet">

You may call groups like:

<link href="/min/css" rel="stylesheet">

Kohana style:

<?php echo html::style('min?g=css') // or html::style('min/css') ?>

Debugging

Append ?debug=1 to your min/ URL, it will show you what's going on in your file., (*5)

Have fun!, (*6)

The Versions

03/03 2016

dev-master

9999999-dev

Minify module for Kohana 3.x

  Sources   Download

The Requires

 

css javascript js minify kohana stylesheet

03/08 2013

3.2.x-dev

3.2.9999999.9999999-dev

Minify module for Kohana 3.x

  Sources   Download

The Requires

 

css javascript js minify kohana stylesheet

03/08 2013

2.1.7

2.1.7.0

Minify module for Kohana 3.x

  Sources   Download

The Requires

 

css javascript js minify kohana stylesheet

05/04 2013

0.8

0.8.0.0

Minify module for Kohana 3.x

  Sources   Download

The Requires

 

css javascript js minify kohana stylesheet