-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.coffee
44 lines (38 loc) · 903 Bytes
/
app.coffee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
console.clear()
App = new Marionette.Application()
window.$ = $
window._ = _
window.App = App
window.Backbone = Backbone
window.log = (args...) ->
if _.size(args) is 1
console.log args[0]
else
console.log args
window.info = (args...) ->
if _.size(args) is 1
console.info args[0]
else
console.info args
window.warn = (args...) ->
if _.size(args) is 1
console.warn args[0]
else
console.warn args
App.addRegions
headerRegion: '#header-region'
mainRegion: '#main-region'
App.on 'initialize:before', (options) ->
log 'init:before'
require('./binnyfields.scss')
App.on 'initialize:after', ->
log 'init:after'
Header = require('./apps/header/header_app')
Header.start()
Inventory = require('./apps/inventory/inventory_app')
Inventory.start()
if Backbone.history
Backbone.history.start
pushState: true
root: '/'
module.exports = App