RE: [coldbox:17814] [Announcement] ColdBox Connection Today at Noon CST

I’ll see if I can scrape some samples together of our ANT scripts and such.

We’re not using Jenkins to compress our JS and CSS assets, but that’s really only because we weren’t using Jenkins when we set that up. Right now we’re using the JSMin plugin and we have a bit of code that compresses all our common js files when the framework gets reinitted. We’ve wanted to switch that over to the build process for a while now and there are several plugins in Jenkins for doing just that.



ColdBox Platform Evangelist
Ortus Solutions, Corp

ColdBox Platform:

The jsmin project is a java project I did so you can call it via ant as well

Luis Majano
Ortus Solutions, Corp

ColdBox Platform:
Linked In:
Social: | |

Thanks Brad. It would be awesome if you could share some of those scripts. This thread got me thinking this morning about minification and I started messing around with the JSMin plugin. For the most part it went well, however sometimes when I tried to add files like Twitter’s bootstrap.css and bootstrap-responsive.css the plugin didn’t include those files into the minification. Have you ever seen that before?

To shed some light on where I’m going with this… I’m looking to extend the technique I’m using with the NewRelic interceptor (other thread) for a minification Helper. I have a custom request context decorator that allows me to call event.addAsset(‘foo.js’) or event.addAsset(‘foo.css’) in any of my handlers. this allows me granularly control of loading in certain css/js files depending on the part of the app that i’m in. I’m then looking to take the helper to the next level to grab all the assets and minify on the fly. I’m curious to what you think of this approach. Do you think it’s better to minify everything up front (either by ant or how you’re doing it at fwreinit) or a more dynamic / flexible way of doing it, on a per request basis so that if one part of a larger app requires more assets, they can be loaded / minified when needed as opposed to the entire application loading the entire css/js that spans the entire application. Thoughts?