@mparticle/web-localytics-kit 2.0.0-rc.2 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/LocalyticsEventForwarder.common.js +14 -22
- package/package.json +35 -25
|
@@ -11,16 +11,6 @@ function isObject(val) {
|
|
|
11
11
|
return val != null && typeof val === 'object' && Array.isArray(val) === false;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
var isobject = /*#__PURE__*/Object.freeze({
|
|
15
|
-
'default': isObject
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
function getCjsExportFromNamespace (n) {
|
|
19
|
-
return n && n['default'] || n;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
var isobject$1 = getCjsExportFromNamespace(isobject);
|
|
23
|
-
|
|
24
14
|
// Copyright 2015 mParticle, Inc.
|
|
25
15
|
//
|
|
26
16
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -99,7 +89,7 @@ var isobject$1 = getCjsExportFromNamespace(isobject);
|
|
|
99
89
|
l[i] = function() { (l[i].q = l[i].q || []).push(arguments); };
|
|
100
90
|
l[i].t = +new Date;
|
|
101
91
|
(s = y.createElement(t)).type = 'text/javascript';
|
|
102
|
-
s.src = '//web.localytics.com/
|
|
92
|
+
s.src = '//web.localytics.com/v4/localytics.min.js';
|
|
103
93
|
(c = y.getElementsByTagName(t)[0]).parentNode.insertBefore(s, c);
|
|
104
94
|
}(window, document, 'script', 'll');
|
|
105
95
|
|
|
@@ -335,16 +325,16 @@ var isobject$1 = getCjsExportFromNamespace(isobject);
|
|
|
335
325
|
|
|
336
326
|
function register(config) {
|
|
337
327
|
if (!config) {
|
|
338
|
-
|
|
328
|
+
console.log('You must pass a config object to register the kit ' + name);
|
|
339
329
|
return;
|
|
340
330
|
}
|
|
341
331
|
|
|
342
|
-
if (!
|
|
343
|
-
|
|
332
|
+
if (!isObject(config)) {
|
|
333
|
+
console.log('\'config\' must be an object. You passed in a ' + typeof config);
|
|
344
334
|
return;
|
|
345
335
|
}
|
|
346
336
|
|
|
347
|
-
if (
|
|
337
|
+
if (isObject(config.kits)) {
|
|
348
338
|
config.kits[name] = {
|
|
349
339
|
constructor: constructor
|
|
350
340
|
};
|
|
@@ -354,15 +344,17 @@ var isobject$1 = getCjsExportFromNamespace(isobject);
|
|
|
354
344
|
constructor: constructor
|
|
355
345
|
};
|
|
356
346
|
}
|
|
357
|
-
|
|
347
|
+
console.log('Successfully registered ' + name + ' to your mParticle configuration');
|
|
358
348
|
}
|
|
359
349
|
|
|
360
|
-
if (
|
|
361
|
-
window.mParticle.addForwarder
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
350
|
+
if (typeof window !== 'undefined') {
|
|
351
|
+
if (window && window.mParticle && window.mParticle.addForwarder) {
|
|
352
|
+
window.mParticle.addForwarder({
|
|
353
|
+
name: name,
|
|
354
|
+
constructor: constructor,
|
|
355
|
+
getId: getId
|
|
356
|
+
});
|
|
357
|
+
}
|
|
366
358
|
}
|
|
367
359
|
|
|
368
360
|
var LocalyticsEventForwarder = {
|
package/package.json
CHANGED
|
@@ -1,27 +1,37 @@
|
|
|
1
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
|
-
|
|
2
|
+
"name": "@mparticle/web-localytics-kit",
|
|
3
|
+
"version": "2.1.0",
|
|
4
|
+
"author": "mParticle Developers <developers@mparticle.com> (https://www.mparticle.com)",
|
|
5
|
+
"description": "mParticle integration sdk for Localytics",
|
|
6
|
+
"main": "dist/LocalyticsEventForwarder.common.js",
|
|
7
|
+
"browser": "dist/LocalyticsEventForwarder.common.js",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist/LocalyticsEventForwarder.common.js"
|
|
10
|
+
],
|
|
11
|
+
"repository": "https://github.com/mparticle-integrations/mparticle-javascript-integration-localytics",
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "rollup --config rollup.config.js",
|
|
14
|
+
"watch": "rollup --config rollup.config.js -w",
|
|
15
|
+
"test": "node test/boilerplate/test-karma.js"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"chai": "^4.2.0",
|
|
19
|
+
"karma": "^5.1.0",
|
|
20
|
+
"karma-chai": "^0.1.0",
|
|
21
|
+
"karma-chrome-launcher": "^3.1.0",
|
|
22
|
+
"karma-firefox-launcher": "^1.3.0",
|
|
23
|
+
"karma-mocha": "^2.0.1",
|
|
24
|
+
"mocha": "^2.5.3",
|
|
25
|
+
"rollup": "^1.13.1",
|
|
26
|
+
"rollup-plugin-commonjs": "^10.0.0",
|
|
27
|
+
"rollup-plugin-node-resolve": "^5.0.1",
|
|
28
|
+
"shelljs": "^0.8.4",
|
|
29
|
+
"should": "^7.1.0",
|
|
30
|
+
"watchify": "^3.11.1"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"isobject": "^4.0.0",
|
|
34
|
+
"@mparticle/web-sdk": "^2.11.1"
|
|
35
|
+
},
|
|
36
|
+
"license": "Apache-2.0"
|
|
27
37
|
}
|