Lungo.Init.coffee 481 B

1234567891011121314151617
  1. ###
  2. Instance initializer
  3. @namespace Lungo
  4. @class Init
  5. @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
  6. ###
  7. Lungo.init = (config) ->
  8. Lungo.Config = config
  9. Lungo.Resource.load config.resources if config and config.resources
  10. do Lungo.Boot.Device.init
  11. isPhone = Lungo.DEVICE is Lungo.Constants.DEVICE.PHONE
  12. Lungo.Router = if isPhone then Lungo.RouterPhone else Lungo.RouterTablet
  13. do Lungo.Boot.Events.init
  14. do Lungo.Boot.Data.init
  15. do Lungo.Boot.Layout.init