-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathGruntRunnerBasic.tmpl
144 lines (124 loc) · 4.37 KB
/
GruntRunnerBasic.tmpl
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Jasmine Spec Runner</title>
<% css.forEach(function(style){ %>
<link rel="stylesheet" type="text/css" href="<%= style %>">
<% }); %>
<% with (scripts) { %>
<% [].concat(polyfills, jasmine, vendor, helpers).forEach(function(script){ %>
<script src="<%= script %>"></script>
<% }) %>
<% }; %>
<script src=".grunt/grunt-contrib-jasmine/boot0.js"></script>
<script src=".grunt/grunt-contrib-jasmine/boot1.js"></script>
<!-- Soho Configuration -->
<script type="application/javascript">
var SohoConfig = {
culturesPath: 'libraries/soho/js/cultures/',
minifyCultures: false,
personalize: {
noInit: true
}
};
</script>
<!-- SData Client Library -->
<script type="text/javascript" src="libraries/sdata/sdata-client-dependencies-debug.js"></script>
<script type="text/javascript" src="libraries/sdata/sdata-client-debug.js"></script>
<!-- Simplate -->
<script type="text/javascript" src="libraries/Simplate.js"></script>
<!-- PouchDB -->
<script type="text/javascript" src="libraries/pouchdb/pouchdb-7.2.1.js"></script>
<!-- Deep Diff -->
<script type="text/javascript" src="libraries/deep-diff/deep-diff.min.js"></script>
<!-- Page.js -->
<script type="text/javascript" src="libraries/pagejs-1.6.1/page.js"></script>
<!-- Babel -->
<script type="text/javascript" src="libraries/babel-polyfill/polyfill.js"></script>
<!-- moment -->
<script type="text/javascript" src="libraries/moment/moment-with-locales.js"></script>
<!-- L20N.js -->
<script type="text/javascript" src="libraries/l20n/l20n.js"></script>
<!-- jQuery -->
<script type="text/javascript" src="libraries/soho/js/jquery-3.6.0.js"></script>
<!-- SohoXi -->
<script type="text/javascript" src="libraries/soho/js/sohoxi.js"></script>
<!-- Redux -->
<script type="text/javascript" src="libraries/redux/redux.min.js"></script>
<!-- ICRM Common, depends on moment -->
<script type="text/javascript" src="libraries/icrm/common.bundle.js"></script>
<script type="text/javascript" src="libraries/icrm/customization.bundle.js"></script>
<script type="text/javascript" src="libraries/icrm/services.bundle.js"></script>
<!-- Provide an empty resource expected by l20n lib. Argos loads l20n files during bootstrap -->
<script type="application/l20n">{}</script>
<!-- Dojo -->
<script type="text/javascript" src="libraries/dojo/dojo/dojo.js" data-dojo-config="parseOnLoad:false, async:true"></script>
<script type="text/javascript">
require({
baseUrl: "./",
packages: [
{ name: 'dojo', location: 'libraries/dojo/dojo' },
{ name: 'dijit', location: 'libraries/dojo/dijit' },
{ name: 'snap', location: 'libraries/snap', main: 'snap' },
{ name: 'argos', location: 'src-out' },
{ name: 'tests', location: 'tests' }
],
map: {
'*': {
'Sage/Platform/Mobile': 'argos'
}
}
});
</script>
<% css.forEach(function(style){ %>
<link rel="stylesheet" type="text/css" href="<%= style %>">
<% }); %>
</head>
<body>
<script type="text/javascript">
function buildContext() {
var filePaths = {
'./localization/locales/argos': [
'strings.l20n',
'regional.l20n'
]
};
var supportedLocales = [
'en'
];
var ctx = L20n.getContext();
var defaultLocale = 'en';
var currentLocale = 'en';
Object.keys(filePaths).forEach(function(path) {
var files = filePaths[path];
files.forEach(function(file) {
ctx.linkResource(function(locale) {
return [path, locale, file].join('/');
});
});
});
ctx.registerLocales(defaultLocale, supportedLocales);
ctx.requestLocales(currentLocale);
window.localeContext = ctx;
window.defaultLocaleContext = ctx;
window.regionalContext = ctx;
return ctx;
}
<% with (scripts) { %>
var ctx = buildContext();
ctx.ready(function() {
define('jquery', function() {
return window.$;
});
require([
'tests/all'
]);
});
require([
'<%= [].concat(scripts.reporters).join("','") %>'
]);
<% }; %>
</script>
</body>
</html>