I am building a build script for our web development team. We will be using this script to prepare all our front-end code for production. I am using the YUI Compressor to compress our CSS and JavaScript files. Everything works fine for the CSS portion but I am running into an issue the JavaScriptCompressor class instance.
I am importing the YUI files via this line:
import com.yahoo.platform.yui.compressor.*;
Here is my JavaScriptCompressor instance:
FileReader ftcreader = new FileReader(ftc);
JavaScriptCompressor js = new JavaScriptCompressor(ftcreader);
For reference, here is how I am using the CssCompressor class,which works properly:
FileReader ftcreader = new FileReader(ftc);
CssCompressor css = new CssCompressor(ftcreader);
For some reason, I am getting an error for the JavaScriptCompressor class, stating:
The constructor JavaScriptCompressor(FileReader) is undefined
Am I importing the YUI Compressor files incorrectly? Or is it something else? Any help would be greatly appreciated.