mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-13 22:49:51 -04:00
Added initialization of the schema files
This commit is contained in:
parent
c2c0496883
commit
fc8684967d
1 changed files with 28 additions and 0 deletions
|
@ -1,5 +1,22 @@
|
|||
app = require 'application'
|
||||
|
||||
channelSchemas =
|
||||
'app': require './schemas/subscriptions/app'
|
||||
'bus': require './schemas/subscriptions/bus'
|
||||
'editor': require './schemas/subscriptions/editor'
|
||||
'errors': require './schemas/subscriptions/errors'
|
||||
'level': require './schemas/subscriptions/level'
|
||||
'misc': require './schemas/subscriptions/misc'
|
||||
'play': require './schemas/subscriptions/play'
|
||||
'surface': require './schemas/subscriptions/surface'
|
||||
'tome': require './schemas/subscriptions/tome'
|
||||
'user': require './schemas/subscriptions/user'
|
||||
'world': require './schemas/subscriptions/world'
|
||||
|
||||
definitionSchemas =
|
||||
'bus': require './schemas/definitions/bus'
|
||||
'misc': require './schemas/definitions/misc'
|
||||
|
||||
init = ->
|
||||
app.initialize()
|
||||
Backbone.history.start({ pushState: true })
|
||||
|
@ -9,6 +26,10 @@ init = ->
|
|||
treemaExt.setup()
|
||||
filepicker.setKey('AvlkNoldcTOU4PvKi2Xm7z')
|
||||
|
||||
# Set up Backbone.Mediator schemas
|
||||
configureChannels()
|
||||
configureDefinitions()
|
||||
|
||||
$ -> init()
|
||||
|
||||
handleNormalUrls = ->
|
||||
|
@ -32,3 +53,10 @@ handleNormalUrls = ->
|
|||
|
||||
return false
|
||||
|
||||
configureChannels = ->
|
||||
for channel of channelSchemas
|
||||
Backbone.Mediator.addChannelSchemas channelSchemas[channel]
|
||||
|
||||
configureDefinitions = ->
|
||||
for definition of definitionSchemas
|
||||
Backbone.Mediator.addDefSchemas definitionSchemas[definition]
|
Loading…
Reference in a new issue