CodeIgniter Forums
Minify CSS and JS in CodeIgniter - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6)
+--- Forum: CodeIgniter 3.x (https://forum.codeigniter.com/forumdisplay.php?fid=17)
+--- Thread: Minify CSS and JS in CodeIgniter (/showthread.php?tid=162)



Minify CSS and JS in CodeIgniter - GrigoreMihai - 11-06-2014

In all of my projects I use them and i think it will be a nice idea to have then included in CI in the future.

What do you think ?


RE: Minify CSS and JS in CodeIgniter - direx - 11-06-2014

As for me, this is a very good idea. Otherwise, do not have to polzovatsja native library . What is not very convenient .


RE: Minify CSS and JS in CodeIgniter - nnolting - 11-06-2014

I used to use php libraries for compiling .less -> .css and magnifying js, but now days I use Grunt for those type of tasks. I don't like the idea of a on the fly compiler in php barfing on some .less code and my site becoming unstyled.


RE: Minify CSS and JS in CodeIgniter - GrigoreMihai - 11-07-2014

(11-06-2014, 08:05 AM)nnolting Wrote: I used to use php libraries for compiling .less -> .css and magnifying js, but now days I use Grunt for those type of tasks. I don't like the idea of a on the fly compiler in php barfing on some .less code and my site becoming unstyled.

Haha .. Don't be so negative ... I never had problems like that with css minifycation Angel


RE: Minify CSS and JS in CodeIgniter - haneez - 11-07-2014

Yeah It would be nice if there can be some sort of a development and production environment preference to enable, features like minify and gzip.


RE: Minify CSS and JS in CodeIgniter - includebeer - 11-09-2014

(11-06-2014, 08:05 AM)nnolting Wrote: now days I use Grunt for those type of tasks.

Exactly. A build process like Grunt is the way to go. Minifying on the fly can lead to problems that can be easily avoided (performance, crash, minified version not updated after you change the source file, etc)


RE: Minify CSS and JS in CodeIgniter - no1youknowz - 11-09-2014

I'm using

Code:
http://code.google.com/p/minify/

Didn't need to do anything with CI to integrate it.


RE: Minify CSS and JS in CodeIgniter - kilishan - 11-09-2014

I don't like having this as a core item, personally. There are lots of third-party tools, some php, some CLI tools and others apps for your operating system, or even build systems like Phing or Ant that get used to do this already. For the most part they're pretty straightforward to integrate into your workflow and they are all constantly getting better. I don't see a need for the small number of CI devs to be required to keep up with another technology.


RE: Minify CSS and JS in CodeIgniter - sv3tli0 - 11-10-2014

+1 Minify is important but its good to be added in next major version (3.1 / 4.0).
How ever there should be a discussion about Minify / Assets and what will fit best at CI concept?


RE: Minify CSS and JS in CodeIgniter - Narf - 11-10-2014

Well, if anybody had bothered to take a look at the github repo, you'd know that there's an experimental minifier in 3.0-dev since 2012.