kadamwhite/wcchi-demo — pull request #3 by kadamwhite (2013-06-26 15:10:09+00:00)
Title: Move the markup to a partial and use Grunt to pre-compile the template

To enable our gallery's markup to be cached along with the rest of our JS, we move it out of the PHP and into an external `.tmpl` file. We then use Grunt (with the [grunt-contrib-jst](https://github.com/gruntjs/grunt-contrib-jst) plugin) to pre-compile the template, and bundle it up with the rest of our scripts. Now the template is automatically available on a global namespace object within our JavaScript—we don't ever have to directly call Underscore! (**Note**: Underscore must still be enqueued, or the compiled template code will fail.)