-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
76 lines (71 loc) · 2.39 KB
/
main.js
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
require.config({
waitSeconds: 0, //prevent timeout by requirejs
paths: {
css: 'https://cdnjs.cloudflare.com/ajax/libs/require-css/0.1.10/css',
vue: 'https://cdn.rawgit.com/edgardleal/require-vuejs/aeaff6db/dist/require-vuejs' //Mismatched anonymous define() module
,
jquery: "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery",
Vue2: "https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.13/vue",
bootstrap: "https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0/js/bootstrap.bundle"
,
bootstrapMD: "https://unpkg.com/bootstrap-material-design@4.1.1/dist/js/bootstrap-material-design",
popper: "https://unpkg.com/popper.js@1.12.6/dist/umd/popper",
bootstrap_notify: "https://cdnjs.cloudflare.com/ajax/libs/mouse0270-bootstrap-notify/3.1.7/bootstrap-notify.min"
},
map: {
'*': {
css: 'css'
}
},
config: {
text: {
useXhr: function (url, protocol, hostname, port) {
// allow cross-domain requests - remote server allows CORS
return true;
}
}
},
shim: {
notify: ["jquery"],
bootstrap: ["jquery"],
bootstrapMD: ["jquery", "bootstrap", "popper.js"]
},
exclude: ['require-css/normalize']
});
//PRE-LOADINGS
define('notify', ["bootstrap_notify"]); //(LOAD WITHOUT WAIT 'jquery')
//DEFFINITIONS
var module = "";
define('Vue', ["Vue2"], function (vue) {
window.Vue = vue;
return vue;
});
define('popper.js', ["popper"], function (popper) {
window.Popper = popper;
return popper;
});
require([
//BOOT
"src/boot/exceptions",
"src/boot/router",
"src/boot/utils"
,
//CSS LIBS
//"css!https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0/css/bootstrap.min",
"css!https://unpkg.com/bootstrap-material-design@4.1.1/dist/css/bootstrap-material-design.min",
"css!https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome",
"css!https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min", //"bootstrap_notify" NEED
"css!src/index.css"
,
//PRE LOAD
"jquery", "Vue", "notify"
], function (exceptions, router) {
exceptions();
router();
});
/* NOT ESSENTIAL AND DELAYABLE LIBS */
require([
"css!src/libs/bootstrap-modal-pages",
"bootstrap",
"bootstrapMD"
]);