Skip to content

Instantly share code, notes, and snippets.

View mattd's full-sized avatar

Matt Dawson mattd

  • WillowTree Apps
  • Charlottesville, VA
View GitHub Profile
define([
'routers/base'
], function (BaseRouter) {
"use strict";
return BaseRouter.extend({
appRoutes: {
'groups': 'showGroups',
'groups/:id': 'showLearners'
}
define([
'marionette',
'views/layouts/groups',
'views/group/collection',
'views/learner/collection',
'collections/api/group',
'collections/api/learner'
], function (
Marionette,
GroupsLayout,
define([
'marionette',
'collections/client/tab',
'views/tab/model'
], function (Marionette, TabCollection, TabModelView) {
"use strict";
return Marionette.CollectionView.extend({
initialize: function (options) {
this.setSelected(options.id);
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Jasmine Spec Runner</title>
<script data-main="./app/scripts/config.js" src="./app/scripts/lib/require.js"></script>
<link rel="stylesheet" type="text/css" href="./node_modules/grunt-contrib-jasmine/vendor/jasmine-1.3.0/jasmine.css">
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Jasmine Spec Runner</title>
<script data-main="./<%= options.requireConfig.config %>" src="<%= options.requireConfig.requirejs %>"></script>
<% css.forEach(function(style){ %>
<link rel="stylesheet" type="text/css" href="<%= style %>">
<% }) %>
<% with (scripts) { %>
/*global module:false*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
// Metadata.
pkg: grunt.file.readJSON('package.json'),
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
/*global module:false*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
// Metadata.
pkg: grunt.file.readJSON('package.json'),
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
require([
// Core
'app',
'backbone',
'marionette',
// Plugins & Patches
'string',
'jquery.cookie',
'marionette.formview'
], function (app, Backbone, Marionette) {
require.config({
deps: ["main"],
paths: {
// Core
'jquery': 'lib/jquery',
'underscore': 'lib/underscore',
'json2': 'lib/json2',
'backbone': 'lib/backbone',
'marionette': 'lib/backbone.marionette',
/*global Backbone,define*/
;(function (root, factory) {
"use strict";
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['marionette','jquery','underscore'], factory);
} else {
// Browser globals
root.Marionette.FormView = factory(root.Marionette,root.jQuery,root._);