Minimal, JavaScript / CSS / HTML project springboard with Closure Compiler / YUI Compressor / JSDoc ANT build file and simple MVC template
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 5 commits behind soulwire:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Springboard is an ultra minimal JavaScript / CSS and HTML project springboard.

It features a useful ANT build file which can:

  • Refactor template files to match your project and namespace
  • Compile JavaScript using the Google Closure Compiler
  • Minify CSS using the YUI Compressor
  • Generate JavaScript documentation using the JSDoc Toolkit
  • Sanitize HTML and inject variables at compile time

Also included is a simple JavaScript Model-View-Controller (MVC) template (based on Alex Netkachov's) which can optionally be used as a basis for your project.

Quick Setup

To get started, first clone the repository:

cd /your/workspace
git clone 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 and compile using Closure Compiler. The build script will then replace this block with a reference to the compiled file.

<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>

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.

Springboard supports blocks for both third party libraries and project source files in CSS and JavaScript. Libraries used by your project are combined to reduce HTTP requests but not minfied, whereas project source files are.

Springboard uses externs to manage compiled code dependancies and ships with externs for JQuery 1.5. Externs for other libraries can be generated using Closure Compiler Externs Extractor.

###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:

ant build

To generate JavaScript documentation, run jsdoc:

ant jsdoc