JSMin in ColdBox 4.1

I’m having no luck getting JSMin to work with ColdBox 4.1. I’ve tried ,moving it to modules/cbcompat/plugins, now it complains about the JavaLoader call, which i’ve tried replacing with getInstance, which makes it complain about passing the controller. GGRR

Any have any luck with this? You’d be my hero if you have example code you can share?

I figured it out :slight_smile:

move JSMin.cfc and /lib to cbcompat/plugins folder

box install javaloader
change getPlugin(“JavaLoader”) in JSMin.cfc to getInstance(‘loader@cbjavaloader’)

I’m calling it with
property name=“JSMin” inject=“provider:coldbox:plugin:JSMin”

JSMin.minify();

There is also a HTML Compressor Module available… http://www.coldbox.org/forgebox/view/ColdBox-HTML-Compressor