Skip to content

Instantly share code, notes, and snippets.

@mikefowler
Created December 28, 2012 02:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikefowler/4394067 to your computer and use it in GitHub Desktop.
Save mikefowler/4394067 to your computer and use it in GitHub Desktop.
Defining RequireJS modules + Coffeescript classes with the RequireJS sugar syntax. More detail here: http://requirejs.org/docs/whyamd.html#sugar
define (require) ->
$ = require 'jquery'
_ = require 'underscore'
Backbone = require 'backbone'
Handlebars = require 'handlebars'
View = require 'lib/view'
startTemplate = require 'text!templates/start.html'
class StartView extends View
id: 'start'
_template: Handlebars.compile(startTemplate)
initialize: (options)->
# Initialize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment