PDA

View Full Version : Updated JsBuilder.jar with CSS compression and more YUI Compressor Options



brookd
30 Nov 2009, 1:29 PM
Hello,

I have a new version of the jsBuilder2.jar file. It adds support for the following:

1. Combination and compression of CSS files (same syntax in the json file as JS files...)

2. Fix a bug (what I consider a bug) when outputting a build where all files in the build directory and sub directories had the licenseText appended even when the files were not part of the build. The result, when building to the output directory a subset of the project was multiple licenseText includes.

3. Output filenames while creating the build so that JS errors that broke the compression could be detected. Once an error occurs, you can see exactly which file the error was in.

4. Added support for all YUI Compressor flags. Example:



java -jar c:\testproject1\jsbuilder2\JSBuilder2.jar --preserve-semi --nomunge --verbose --projectFile C:\testproject1\JSBuilder2\testproject.jsb2 --homeDir c:\testproject1\


It was too big to attach to this forum post. I don't have any where to post it so if you want it reply, and I'll email it to you...

Condor
7 Dec 2009, 5:47 AM
I know the Dev team is also working on a new version, but it's nice to see that somebody has created a temporary intermediate version.

Can I request 2 other features:
1. Support a --deployDir flag to override the deployDir from the .jsb2 file.
2. Correct UTF-8 support (the license text should be copied AFTER the UTF-8 BOM marker instead of before).

brookd
7 Dec 2009, 8:53 AM
Hi Condor,

I actually contracted out these changes on oDesk, cause I needed them for my project. Especially the licensetext (bug?) where all files in the output dir that were not part of the build would get the licensetext added over and over.

So, I can't make your requested changes myself. I can pay the guy would did the first changes to make these changes. I guess it might cost 20 bucks. Do you want to cover it and I'll get him to make those two changes? Sorry, I'm not able to do it myself :)

mrjoltcola
22 Dec 2009, 9:38 PM
Is it possible to run onlythe YUI compression step? When I created a jsb2 project for my app, JSBuilder2 complains when I do not have a resources section, and it also seems to copy files by default from source to destination. I just want it to package individual .js into a minified file.

brookd
23 Dec 2009, 10:38 AM
If I recall correctly you should be able to define a blank resources config, but it needs to be there, just leave it empty...

Gjslick
7 Jun 2010, 3:54 PM
Hey brookd, since the JAR file itself is too big for posting on the forum, can you just post the JSBuilder2.java source file? I'd like to include your changes in my build as well.

Thanks,

Greg

brookd
8 Jun 2010, 7:50 AM
Hi Greg,

I don't have the source, I can send you the JAR if you want it...

josevossjunior@gmail.com
28 Jul 2010, 4:08 PM
Please, could you send me the new JSBuilder with CSS compression, thanks a lot
josevossjunior@gmail.com


Hello,

I have a new version of the jsBuilder2.jar file. It adds support for the following:

1. Combination and compression of CSS files (same syntax in the json file as JS files...)

2. Fix a bug (what I consider a bug) when outputting a build where all files in the build directory and sub directories had the licenseText appended even when the files were not part of the build. The result, when building to the output directory a subset of the project was multiple licenseText includes.

3. Output filenames while creating the build so that JS errors that broke the compression could be detected. Once an error occurs, you can see exactly which file the error was in.

4. Added support for all YUI Compressor flags. Example:



java -jar c:\testproject1\jsbuilder2\JSBuilder2.jar --preserve-semi --nomunge --verbose --projectFile C:\testproject1\JSBuilder2\testproject.jsb2 --homeDir c:\testproject1\


It was too big to attach to this forum post. I don't have any where to post it so if you want it reply, and I'll email it to you...