-
Add the module to kohana modules directory
a) If you have a git repo, you can add it as an submodule
git submodule add git://github.com/birkir/media.git modules/media
git submodule init
git submodule update
b) You can also just add it to your project
git clone git://github.com/birkir/media.git
-
Go to APPPATH/bootstrap.php and add this to your Kohana::modules array
'media' => MODPATH.'media', // Media module
-
The module is ready to rock.
Store your media files in APPPATH/media folder. So for example if you create a file called APPPATH/media/css/screen.css then you can access the file through http://DOCROOT/media/css/screen.css but the file will be minified and compressed before output to the browser.
Same story for image files, but they will be compressed by smush.it service (if your server is accessible from the internet) and then gzipped.
Ext | Minify | Smush.it | Gzip* | Sass | Less | Haml | Combining |
---|---|---|---|---|---|---|---|
css | X | X | |||||
js | X | X | |||||
png | X | X | |||||
jpg | X | X | |||||
gif | X | X |