Created
December 17, 2014 19:18
-
-
Save elentok/0d84f38a0c745977b6de to your computer and use it in GitHub Desktop.
Marionette module
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Classic Marionette < 2.0.2 | |
# --------------------------------- | |
MyApp.module 'moduleName', -> | |
# module constructor code | |
# Classic Marionette >= 2.0.2 | |
# --------------------------------- | |
MyModule = Marionette.Module.extend | |
constructor: -> | |
initialize: -> | |
onStart: -> | |
MyApp.module 'moduleName', MyModule | |
# Browserified | |
# --------------------------------- | |
# in my-module.coffee | |
MyModule = Marionette.Module.extend | |
constructor: -> | |
initialize: -> | |
onStart: -> | |
module.exports = MyModule | |
# in my-app.coffee | |
... | |
App.module 'myModule', require 'my-module' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment