@next-core/brick-container 3.1.25 → 3.1.26
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/package.json +2 -2
- package/serve/utils/sizeCheck.js +53 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next-core/brick-container",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.26",
|
|
4
4
|
"description": "Brick Container Server",
|
|
5
5
|
"homepage": "https://github.com/easyops-cn/next-core/tree/v3/packages/brick-container",
|
|
6
6
|
"license": "GPL-3.0",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"@next-core/runtime": "*",
|
|
57
57
|
"@next-core/utils": "*"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "24fba3e8643f05201137b95ba42c42bb6fa41117"
|
|
60
60
|
}
|
package/serve/utils/sizeCheck.js
CHANGED
|
@@ -13,8 +13,10 @@ export function getSizeCheckStoryboards(brickPackages) {
|
|
|
13
13
|
{
|
|
14
14
|
app: getSizeCheckApp(),
|
|
15
15
|
routes: [
|
|
16
|
+
// By each brick
|
|
16
17
|
{
|
|
17
18
|
path: `\${APP.homepage}/-`,
|
|
19
|
+
exact: true,
|
|
18
20
|
bricks: [
|
|
19
21
|
{
|
|
20
22
|
brick: "ul",
|
|
@@ -22,7 +24,7 @@ export function getSizeCheckStoryboards(brickPackages) {
|
|
|
22
24
|
pkg.bricks.concat(pkg.elements ?? []).map((brick) => ({
|
|
23
25
|
brick: "li",
|
|
24
26
|
properties: {
|
|
25
|
-
textContent: brick
|
|
27
|
+
textContent: `${pkg.id.split("/")[1]}:${brick}`,
|
|
26
28
|
},
|
|
27
29
|
}))
|
|
28
30
|
),
|
|
@@ -38,6 +40,7 @@ export function getSizeCheckStoryboards(brickPackages) {
|
|
|
38
40
|
...brickPackages.flatMap((pkg) =>
|
|
39
41
|
pkg.bricks.concat(pkg.elements ?? []).map((brick) => ({
|
|
40
42
|
path: `\${APP.homepage}/${brick}`,
|
|
43
|
+
exact: true,
|
|
41
44
|
preLoadBricks: [brick],
|
|
42
45
|
bricks: [
|
|
43
46
|
{
|
|
@@ -47,6 +50,55 @@ export function getSizeCheckStoryboards(brickPackages) {
|
|
|
47
50
|
],
|
|
48
51
|
}))
|
|
49
52
|
),
|
|
53
|
+
|
|
54
|
+
// By each package
|
|
55
|
+
{
|
|
56
|
+
path: `\${APP.homepage}/packages/-`,
|
|
57
|
+
exact: true,
|
|
58
|
+
bricks: [
|
|
59
|
+
{
|
|
60
|
+
brick: "ul",
|
|
61
|
+
children: brickPackages.map((pkg) => ({
|
|
62
|
+
brick: "li",
|
|
63
|
+
properties: {
|
|
64
|
+
textContent: pkg.id.split("/")[1],
|
|
65
|
+
},
|
|
66
|
+
})),
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
brick: "p",
|
|
70
|
+
properties: {
|
|
71
|
+
textContent: "This is size-check index!",
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
},
|
|
76
|
+
...brickPackages.map((pkg) => ({
|
|
77
|
+
path: `\${APP.homepage}/packages/${pkg.id.split("/")[1]}`,
|
|
78
|
+
exact: true,
|
|
79
|
+
preLoadBricks: pkg.bricks.concat(pkg.elements ?? []),
|
|
80
|
+
bricks: [
|
|
81
|
+
{
|
|
82
|
+
brick: "p",
|
|
83
|
+
properties: { textContent: "This is size-check!" },
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
})),
|
|
87
|
+
|
|
88
|
+
// All together
|
|
89
|
+
{
|
|
90
|
+
path: `\${APP.homepage}/all`,
|
|
91
|
+
exact: true,
|
|
92
|
+
preLoadBricks: brickPackages.flatMap((pkg) =>
|
|
93
|
+
pkg.bricks.concat(pkg.elements ?? [])
|
|
94
|
+
),
|
|
95
|
+
bricks: [
|
|
96
|
+
{
|
|
97
|
+
brick: "p",
|
|
98
|
+
properties: { textContent: "This is size-check!" },
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
},
|
|
50
102
|
],
|
|
51
103
|
},
|
|
52
104
|
];
|