@dcloudio/uni-stat 3.0.0-alpha-3030820220114007 → 3.0.0-alpha-3030820220114011
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/uni-stat.cjs.js +1 -1
- package/dist/uni-stat.es.js +1 -1
- package/lib/uni.plugin.js +26 -28
- package/package.json +3 -3
package/dist/uni-stat.cjs.js
CHANGED
package/dist/uni-stat.es.js
CHANGED
package/lib/uni.plugin.js
CHANGED
|
@@ -14,39 +14,37 @@ var index = [
|
|
|
14
14
|
name: 'uni:stat',
|
|
15
15
|
enforce: 'pre',
|
|
16
16
|
config(config, env) {
|
|
17
|
-
if (uniCliShared.isSsr(env.command, config)) {
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
17
|
const inputDir = process.env.UNI_INPUT_DIR;
|
|
21
18
|
const platform = process.env.UNI_PLATFORM;
|
|
22
|
-
isEnable = uniCliShared.getUniStatistics(inputDir, platform).enable === true;
|
|
23
|
-
if (process.env.NODE_ENV === 'production') {
|
|
24
|
-
const manifestJson = uniCliShared.parseManifestJsonOnce(inputDir);
|
|
25
|
-
if (!manifestJson.appid) {
|
|
26
|
-
console.log();
|
|
27
|
-
console.warn(uniCliShared.M['stat.warn.appid']);
|
|
28
|
-
console.log();
|
|
29
|
-
isEnable = false;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
19
|
const titlesJson = Object.create(null);
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
20
|
+
uniCliShared.parsePagesJson(inputDir, platform).pages.forEach((page) => {
|
|
21
|
+
var _a;
|
|
22
|
+
const style = page.style || {};
|
|
23
|
+
const titleText =
|
|
24
|
+
// MP
|
|
25
|
+
style.navigationBarTitleText ||
|
|
26
|
+
(
|
|
27
|
+
// H5 || App
|
|
28
|
+
(_a = style.navigationBar) === null || _a === void 0 ? void 0 : _a.titleText) ||
|
|
29
|
+
'';
|
|
30
|
+
if (titleText) {
|
|
31
|
+
titlesJson[page.path] = titleText;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
// ssr 时不开启
|
|
35
|
+
if (!uniCliShared.isSsr(env.command, config)) {
|
|
36
|
+
isEnable = uniCliShared.getUniStatistics(inputDir, platform).enable === true;
|
|
37
|
+
if (process.env.NODE_ENV === 'production') {
|
|
38
|
+
const manifestJson = uniCliShared.parseManifestJsonOnce(inputDir);
|
|
39
|
+
if (!manifestJson.appid) {
|
|
40
|
+
console.log();
|
|
41
|
+
console.warn(uniCliShared.M['stat.warn.appid']);
|
|
42
|
+
console.log();
|
|
43
|
+
isEnable = false;
|
|
46
44
|
}
|
|
47
|
-
}
|
|
45
|
+
}
|
|
46
|
+
debug__default["default"]('uni:stat')('isEnable', isEnable);
|
|
48
47
|
}
|
|
49
|
-
debug__default["default"]('uni:stat')('isEnable', isEnable);
|
|
50
48
|
process.env.UNI_STAT_TITLE_JSON = JSON.stringify(titlesJson);
|
|
51
49
|
return {
|
|
52
50
|
define: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcloudio/uni-stat",
|
|
3
|
-
"version": "3.0.0-alpha-
|
|
3
|
+
"version": "3.0.0-alpha-3030820220114011",
|
|
4
4
|
"description": "@dcloudio/uni-stat",
|
|
5
5
|
"main": "dist/uni-stat.es.js",
|
|
6
6
|
"module": "dist/uni-stat.es.js",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
},
|
|
21
21
|
"gitHead": "33e807d66e1fe47e2ee08ad9c59247e37b8884da",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@dcloudio/uni-cli-shared": "3.0.0-alpha-
|
|
24
|
-
"debug": "^4.3.
|
|
23
|
+
"@dcloudio/uni-cli-shared": "3.0.0-alpha-3030820220114011",
|
|
24
|
+
"debug": "^4.3.3"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/debug": "^4.1.7"
|