src/js/bootstrap.js   A
last analyzed

Complexity

Total Complexity 4
Complexity/F 1.33

Size

Lines of Code 51
Function Count 3

Duplication

Duplicated Lines 0
Ratio 0 %

Test Coverage

Coverage 9.38%

Importance

Changes 2
Bugs 0 Features 1
Metric Value
cc 1
wmc 4
c 2
b 0
f 1
nc 2
mnd 1
bc 1
fnc 3
dl 0
loc 51
ccs 3
cts 32
cp 0.0938
crap 1.7441
rs 10
bpm 0.3333
cpm 1.3333
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A bootstrap.js ➔ ??? 0 1 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