Skip to content

Instantly share code, notes, and snippets.

View ryansmith111's full-sized avatar

Ryan Smith ryansmith111

View GitHub Profile
@ryansmith111
ryansmith111 / orders.js
Created May 2, 2012 13:08
Using pre-compiled templates with Backbone.Marionette, require.js and the tpl template plugin
define(function (require, exports, module) {
var ns = require('namespace'),
Backbone = require('use!backbone'),
Marionette = require('use!marionette'),
// the tpl require.js plugin extends the text plugin to compile the text into an underscore template
// The require.js optimizer will minify and concatenate them to your apps single JS
ordersViewTpl = require('tpl!templates/orders.html');
var Orders = ns.module();