Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pocesar/minify-kohana
Minify module for Kohana 3.x
https://github.com/pocesar/minify-kohana
Last synced: 17 days ago
JSON representation
Minify module for Kohana 3.x
- Host: GitHub
- URL: https://github.com/pocesar/minify-kohana
- Owner: pocesar
- Created: 2010-10-30T20:25:55.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2016-03-02T23:13:41.000Z (over 8 years ago)
- Last Synced: 2024-10-18T06:28:26.413Z (27 days ago)
- Language: PHP
- Homepage:
- Size: 374 KB
- Stars: 52
- Watchers: 7
- Forks: 14
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
For Kohana 3.2, use the 3.2 branch, the only thing that changes is the case on the filenames
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:```html
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:```html
```#### 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 folderIt'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:
```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:
```html
```
### You may call groups like:
```html
```
### Kohana style:
```html
```
### Debugging
Append `?debug=1` to your `min/` URL, it will show you what's going on in your file.
Have fun!