Skip to content

Instantly share code, notes, and snippets.

@miloshadzic
Last active December 12, 2015 01:28
Show Gist options
  • Save miloshadzic/4691581 to your computer and use it in GitHub Desktop.
Save miloshadzic/4691581 to your computer and use it in GitHub Desktop.
# AMD require sugared syntax
# http://requirejs.org/docs/whyamd.html#sugar
# Works better when there are many dependencies
# Before
define ['backbone'], (Backbone) ->
class Table extends Backbone.model
# After
define (require) ->
Backbone = require 'backbone'
class Table extends Backbone.Model
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment