Coder Social home page Coder Social logo

minify-kohana's Introduction

It's a Minify module (has been heavily modified to fit kohana auto-loading style, structure and code wise) based on the best minifier for PHP imho > http://code.google.com/p/minify/ Extract the contents to 'modules' folder, enable it in the bootstrap:

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:

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

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:

in PHP:

return array(
   'groupsConfig' => array(
       'css' => array('//css/file1.css', '//css/file2.css', '//css/file3.css')
   )
);

in HTML:

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

Kohana style:

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

Have fun!

minify-kohana's People

Contributors

pocesar avatar

Watchers

Nick Schot avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.