CodeIgniter Forums
Simple assets library - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: Simple assets library (/showthread.php?tid=38015)

Pages: 1 2


Simple assets library - El Forum - 01-27-2011

[eluser]Boris Strahija[/eluser]
I was using the carabiner library, but I wanted something simpler so I created my own. It's base on the excellent carabiner library so there are some similarities, but I wanted to keep it as simple as possible.

All you need to do is load the library, and add the following code to your HTML:
Code:
<?php
    display_css(array('init.css', 'style.css'));
    display_js(array('libs/modernizr-1.6.js', 'libs/jquery-1.4.4.js', 'plugins.js', 'script.js'));
?>

CSS and JS files are combined, minified and stored to the cache folder under assets. You can turn of minifying in the config, but not combining for now.
Oh, and LessPHP is supported and included. There are some examples in the css file, so go and play with it.

The libraries included CSSMin, JSMin and LessPHP are not mine, just to clarify.

---

And another update, version 0.6.0 is up!
Code:
php tools/spark install -v0.6.0 assets

Or:
https://bitbucket.org/bstrahija/assets

And now also available on Github:
https://github.com/bstrahija/assets


Simple assets library - El Forum - 01-27-2011

[eluser]mr.noname[/eluser]
Hi Boris Strahija and thank for your library

I'm Thai, sorry for my English.


Quote:The libraries included CSSMin, JSMin and LessPHP

I try do download your library but could not find some libraries.


1. require APPPATH."libraries/lessc.php

2. $this->ci->load->library(array('cssmin', 'jsmin'));


or what's wrong with me?


Simple assets library - El Forum - 01-27-2011

[eluser]mr.noname[/eluser]
sorry man
i get it from carabiner library

but still look for lessc library.


Simple assets library - El Forum - 01-28-2011

[eluser]Boris Strahija[/eluser]
Yep, my bad. The files are there now, just download the whole thing again.


Simple assets library - El Forum - 01-30-2011

[eluser]Boris Strahija[/eluser]
There is an update, allowing to switch off combining the files, so check it out. I would love some feedback.

Oh and it's tested and working great with CI Reactor Wink


Simple assets library - El Forum - 03-04-2011

[eluser]Roobiz[/eluser]
Very very awesome lib !!!

There is just a little issue with "dev" environnement.

See my bug report here : https://bitbucket.org/bstrahija/assets/issue/1/dev-environnement-doesnt-work


Simple assets library - El Forum - 03-04-2011

[eluser]Boris Strahija[/eluser]
I'm working on a update, and will convert the library into a spark in the next couple of days. Stay tuned for updates Wink


Simple assets library - El Forum - 03-04-2011

[eluser]Roobiz[/eluser]
Great! I'll give you feedback when it will be release Smile


Simple assets library - El Forum - 03-04-2011

[eluser]Boris Strahija[/eluser]
I answered your bug report, could you take a look?


Simple assets library - El Forum - 03-04-2011

[eluser]Boris Strahija[/eluser]
New version is up

The library is now available as a spark:
Code:
php tools/spark install -vv0.3 assets

Or get it here:
https://bitbucket.org/bstrahija/assets