View Full Version : New instructions for using JSBuilder3?
Have the instructions or use changed at all for using JSBuilder3? I am trying to use this with Sencha Touch...and the documentation is still sparse at best, and probably outdated. I see that JSBuilder directory comes with the download package for Touch 1.1, but I see no JSBuilder.jar file anywhere. So how do I launch the tool? I see a batch file...but no docs on using it or how to setup the directory structure properly in a Windows environment.
Love to use these "recommended" tools for performance, just unsure as to why the documentation is always so poor on how to use them. Very frustrating.
30 Mar 2011, 12:42 PM
So it appears that the JSBuilder has changed a lot since JSB2, not sure as I never used JSB2. But now there appears to be a bat file that you run (for Windows) that you can pair with your own .jsb3 config file to accomplish the concatenation of your various app files into one. That all works fine, or so it appears to.
However, I am not really seeing any compression whatsoever, do we have to do something different to force the JSB3 process to compress? I simple made a call the JSBuilder.bat file with the source and destination dirs specified.
I also tried to run the ycompressor on my own, and it reported illegal characters and syntax errors on every whitespace line and comment symbols. Speaking of, why wouldn't these be stripped out of a minimized file?
Would really like Sencha, or someone who knows JSB3 to jump in here and enlighten me, or point me at some JSB3 specific instructions.
I tried to use JS Builder 3, included in Sencha Touch 1.1.0. While it does combine source files, it doesn't minify them. So I explicitly called ycompressor. Then you will get the illegal character errors. It seems that JSBuild encodes the resulting file in utf-8. You can get illegal character errors by specifying --charset utf-8 option for ycompressor.
So to combine and minify your js source files, create a build.bat file like this:
call \path\to\jsbuilder\jsbuilder.bat -p yourapp.jsb3 -d deploy
java -jar \path\to\jsbuilder\ycompressor\ycompressor.jar deploy\all.js -o deploy\all-min.js -v --charset utf-8
I hope this helps.
3 Apr 2012, 1:21 PM
I know it's way late, but in case someone else comes around with the same question... there's a "compress" boolean option you can specify at the package level in your jsb3 file. There's a sample here that shows it, just below the "The .JSB3" header.
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.