Project Description
An automated build for javascript and CSS. The build script will assemble Javascript code spread out in multiple script files into a single file, compile & minimify via google closure compiler, create documentation via jsdocs and zip+deploy.


You can call the build directly from console or integrate in your favorite code editor. For information on use and setup, you may read the following article :
http://blog.typps.com/2011/10/ant-process-driven-build-for-javascript.html

Some screenshots of the build integrated in notepad++



As you can note we used jsdocs annotations to tell the compiler what type the parameter is since javascript does not have support for declaring types like in strongly typed languages. These annotations are stripped out during minification so we don't incur the cost of verbosity in our code. We simply compile the code and dutifully get the above warning.


Another quick example



As you can note above, we told the compiler that the shape object is an interface, we then specified that the square object implements the shape interface. We did all this using jsdocs annotations. However in our Square object we didn't provide the implementation for the draw method. This violates the contract and we are dutifully warned. Note how we've used annotations again and our code does not depend on any third party libraries. It's at a minimum.

Last edited Oct 17, 2011 at 8:37 AM by Ale55andro, version 6