Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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