Total Complexity | 4 |
Complexity/F | 1.33 |
Lines of Code | 51 |
Function Count | 3 |
Duplicated Lines | 0 |
Ratio | 0 % |
Coverage | 9.38% |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | // 3rd party |
||
2 | import React from "react"; |
||
3 | import ReactDOM from "react-dom"; |
||
4 | |||
5 | import Superagent from "superagent"; |
||
6 | import Page from "page"; |
||
7 | import qs from "qs"; |
||
8 | import md5 from "md5"; |
||
9 | import shelpers from "super-helpers"; |
||
10 | |||
11 | // core |
||
12 | import ServicesContainer from "./core/ServicesContainer"; |
||
13 | import EventManager from "./core/EventManager"; |
||
14 | |||
15 | import App from "app"; |
||
16 | 4 | import Config from "./config"; |
|
17 | |||
18 | // Register |
||
19 | App.libs.React = React; |
||
20 | App.libs.ReactDOM = ReactDOM; |
||
21 | App.libs.Superagent = Superagent; |
||
22 | App.libs.Page = Page; |
||
23 | App.libs.qs = qs; |
||
24 | App.libs.md5 = md5; |
||
25 | App.libs.shelpers = shelpers; |
||
26 | |||
27 | App.Config = Config; |
||
28 | |||
29 | App.ServicesContainer = new ServicesContainer(); |
||
30 | App.ServicesContainer.define("EventManager", EventManager); |
||
31 | |||
32 | // shortcuts |
||
33 | App.service = (service) => App.ServicesContainer.get(service); |
||
34 | App.provider = (service) => App.ServicesContainer.get(service); |
||
35 | 4 | App.config = (config, defaultValue = null) => App.Config.get(config, defaultValue); |
|
36 | App.EventManager = App.ServicesContainer.get("EventManager"); |
||
37 | |||
38 | // @todo move |
||
39 | 2 | if (App.config("debug")) { |
|
40 | App.EventManager.enableDebug(); |
||
41 | } |
||
42 | |||
43 | require("./helpers/index"); |
||
44 | require("./services/index"); |
||
45 | require("./providers/index"); |
||
46 | require("./components/index"); |
||
47 | require("./routes/index"); |
||
48 | |||
49 | // main sass file |
||
50 | require("../css/main.scss"); |
||
51 | |||
52 | export default App; |
||
53 |