All the build tasks of spludo are called by using ant. You can add own tasks by editing your applications myapp/build.xml.

You may list all available targets by using:

$ ant -p

Output:

Buildfile: build.xml

        This is the DocsForIt application built with spludo.

Main targets:

 clean               Clean the build directory
 core-api            Generate the spludo core api
 core-clean          Clean the spludo core build folder
 core-lint           Execute jshint on the spludo core
 core-lint-xml       Execute jshint on the spludo core (with xml output)
 core-test           Execute the core tests
 core-test-xml       Execute the core tests (with xml output)
 db:bootstrap        Load the fixtures and execute pending migrations.
 db:fixtures:dump    Dump the current database as fixtures.
 db:fixtures:load    Load the fixtures into the database structure.
 db:fixtures:reset   Remove the current database fixtures dump.
 db:migrate          Execute all pending migrations and create a structure dump.
 db:rollback         Rollback all migrations.
 db:structure:dump   Dump the current database structure to a structure dump.
 db:structure:load   Load the current database structure from a structure dump.
 db:structure:reset  Remove the current database structure dump.
 lint                Execute jshint
 test                Execute the tests
 test-xml            Execute the tests (with xml output)

Even though ant is a powerful tool, some tasks (like converting the text output from jsl into a checkstyle.xml) are pretty difficult to achieve. That's why the framework has a folder called build which contains a helper script called convert_jslint_to_checkstyle.js.

Since this script is written in Javascript it's easy for Javascript developers to extend/maintain it. You should think about such strategy for your own project, too - as soon as you reach the maintainable borders of ant.

Comments