Skip to content

Instantly share code, notes, and snippets.

@msievers
Last active December 20, 2015 11:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save msievers/6120515 to your computer and use it in GitHub Desktop.
Save msievers/6120515 to your computer and use it in GitHub Desktop.
Sample with AMD in place
# assets/javascript/Component.js.coffee
define ->
class
methodEverybodyShouldHave: ->
# ...
# assets/javascript/SeatPlan/InputDataSanitizer.js.coffee
define ->
class
sanitize: (data) ->
# ...
# assets/javascript/SeatPlan/Ui.js.coffee
define ->
class
constructor: (el) ->
# ...
# assets/javascript/SeatPlan.js.coffee
define ['Component', 'SeatPlan/InputDataSanitizer', 'SeatPlan/Ui'], (Component, InputDataSanitizer, Ui) ->
class extends Component
constructor: (el)
@InputDataSanitizer = InputDataSanitizer
@ui = new Ui(el)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment