GoodBoyDigital/pixi.js — pull request #47 by englercj (2013-04-03 15:24:53+00:00)
Title: Add testing Framework, and do some cleanup

There are 2 commits on this PR. The first one adds the testing framework (QUnit) and stubs out all the test files. It also adds a `test` task to the Gruntfile.js so you can do:

grunt test

To run the tests and view the results. You can also do:

grunt connect:test

To run a local webserver, and view http://localhost:9002 to see QUnit run in a browser (to debug errors).

----

The second commit you can take it or leave it. It cleans up the gruntfile and package.json to be in line with the "grunt way" of doing things. It also adds the ability for you to generate your yuidocs using grunt. So all you have to do is say:

grunt docs

And the doc folder will be refreshed with new docs generated from the source files. Good to note is that I left off jshint from the main tasks:

grunt.registerTask('default', ['concat', 'uglify', 'distribute']);
grunt.registerTask('build', ['concat', 'uglify', 'distribute']);

I did that because jshint doesn't pass right now, and I wasn't sure if you even cared. If you do, you can add that task back on:

grunt.registerTask('default', ['jshint', 'concat', 'uglify', 'distribute']);
grunt.registerTask('build', ['jshint', 'concat', 'uglify', 'distribute']);

run the default task:

grunt

or the build task:

grunt build

and fix the jshint errors that you get. Most of what I changed in the second commit is personal preference, and trying to use the "standard" grunt tools where possible.