It features a useful ANT build file which can:
- Refactor template files to match your project and namespace
- Minify CSS using the YUI Compressor
- Sanitize HTML and inject variables at compile time
To get started, first clone the repository:
cd /your/workspace git clone email@example.com:soulwire/Springboard.git YourProjectName
Run the setup task and enter your project's namespace when prompted:
cd YourProjectName ant setup Enter the full project namespace for this project: com.domain.project
This will refactor the project template to match your namespace. You'll then be given the option to delete the GIT metadata and disconnect from the Springboard repository...
Now Start Coding!
Code is combined and compiled / minified using blocks. For example, the following block will compile the contained scripts into a single file (defined in build.properties) and compile using Closure Compiler. The build script will then replace this block with a reference to the compiled file.
<!--[BEGIN:JS:SRC]--> <script src="js/plugins.js"></script> <script src="js/namespace.js"></script> <script src="js/namespace.Event.js"></script> <script src="js/namespace.project.Controller.js"></script> <script src="js/namespace.project.Model.js"></script> <script src="js/namespace.project.View.js"></script> <script src="js/namespace.project.App.js"></script> <!--[END]-->
Scripts and styles embedded outside of blocks will remain untouched to add flexibility, whilst all blocks of the same type in different pages will intelligently be compiled together.
Building with ANT
Aside from the setup task, the two main ANT tasks used by Springboard are build and jsdoc.
To compile your project, run build: