CodeIgniter Forums
Best Way To Handle View Assets - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Best Way To Handle View Assets (/showthread.php?tid=61001)



Best Way To Handle View Assets - El Forum - 08-25-2014

[eluser]robert.fulcher[/eluser]
I have a site and need to minify all the js & css. What is the BEST way to do that with CI? I have found several solutions and CI_Assetic seems to be the best to me. I wanted to get opinions.

Thanks


Best Way To Handle View Assets - El Forum - 09-01-2014

[eluser]avenirer[/eluser]
[quote author="robert.fulcher" date="1409010015"]I have a site and need to minify all the js & css. What is the BEST way to do that with CI? I have found several solutions and CI_Assetic seems to be the best to me. I wanted to get opinions.

Thanks[/quote]

Would seem to advertise myself, but please do try the library I've worked on: https://github.com/avenirer/Assetor

At least tell me your opinion. Thank you very much.


Best Way To Handle View Assets - El Forum - 09-02-2014

[eluser]ivantcholakov[/eluser]
@Avenirer

Add LESS compiler and you will beat them all. Your work is interesting.


Best Way To Handle View Assets - El Forum - 09-02-2014

[eluser]avenirer[/eluser]
Thank you for the input, @ivantcholakov

Just made an update to the library that will compile less files using leafo lessphp.


Best Way To Handle View Assets - El Forum - 09-02-2014

[eluser]ivantcholakov[/eluser]
http://lessphp.gpeasy.com/ This I think is better supported.

I abandoned leafo lessphp about (less than) a year ago, it was buggy and fixes were not fast enough.


Best Way To Handle View Assets - El Forum - 09-02-2014

[eluser]avenirer[/eluser]
[quote author="ivantcholakov" date="1409693368"]http://lessphp.gpeasy.com/ This I think is better supported.

I abandoned leafo lessphp about (less than) a year ago, it was buggy and fixes were not fast enough.[/quote]

Indeed, any choosing in a dependency is a risk. But looking at both of them, in terms of staring, following, issues, downloads, I think Leafo won. Do you think that it would be a better idea to let the users set in the config what compiler to choose?


Best Way To Handle View Assets - El Forum - 09-03-2014

[eluser]ivantcholakov[/eluser]
If you like Leafo's solution, if you already have the implementation, so be it. It is better you to make the choice about the dependency, you are more informed, you will gather the feedback. Configurable dependency seems to me a complication.


Best Way To Handle View Assets - El Forum - 09-03-2014

[eluser]InsiteFX[/eluser]
I use Crunch Less Compiler on my Windows System, it uses Adobe air.




Best Way To Handle View Assets - El Forum - 09-03-2014

[eluser]robert.fulcher[/eluser]
We are putting in CI_Assetic and going to use minify filter. I will let you know how it goes.