-
Notifications
You must be signed in to change notification settings - Fork 11
/
test-global-distribution.html
49 lines (41 loc) · 2.01 KB
/
test-global-distribution.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Linking Required Peer JavaScript Dependencies</title>
</head>
<body>
<!--- Must reference peer dependencies here first since these are not included in wrapped global package -->
<script src="https://unpkg.com/lodash@4.9.0/lodash.js" />
<script src="https://unpkg.com/immutable@3.8.2/dist/immutable.js" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/i18next/19.6.3/i18next.min.js" />
<script src="https://unpkg.com/browse/i18next-browser-languagedetector@6.0.1/dist/umd/i18nextBrowserLanguageDetector.min.js" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.20.0/axios.min.js" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/humanize-plus/1.8.2/humanize.min.js" />
<!-- Reference the most recently built global distribution package -->
<script src="./dist-global/index.js" />
<script>
// Testing 'immutable' peer dependency usage
AndcultureCode.CollectionUtils.length([1, 2]);
// Testing 'Lodash' peer dependency usage
AndcultureCode.CollectionUtils.difference([1, 2], [1]);
// Testing 'i18next' peer dependency usage
AndcultureCode.LocalizationUtils.initialize(
{ type: "backend", init() {} },
[
{
code: "en_US",
resources: null,
},
]
);
AndcultureCode.LocalizationUtils.changeCultureCode("en-UK");
// Testing 'query-string' peer dependency usage
AndcultureCode.RouteUtils.queryStringToObject("#token=bada55cafe");
// Testing 'axios' peer dependency usage
AndcultureCode.ServiceUtils.configure();
// Testing 'humanize-plus' peer dependency usage
AndcultureCode.StringUtils.pluralize(3, "duck");
</script>
</body>
</html>