mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-06-25 17:10:43 +00:00
enhance(dev): tweak Frontend Chunk Report
This commit is contained in:
parent
f5806a0560
commit
d54b948085
1 changed files with 11 additions and 11 deletions
22
.github/scripts/frontend-js-size.mjs
vendored
22
.github/scripts/frontend-js-size.mjs
vendored
|
|
@ -271,7 +271,7 @@ const allChunkKeys = [
|
|||
...addedKeys(before, after),
|
||||
...removedKeys(before, after),
|
||||
];
|
||||
const comparisonRows = getChunkComparisonRows(commonChunkKeys, before, after);
|
||||
//const comparisonRows = getChunkComparisonRows(commonChunkKeys, before, after);
|
||||
const allComparisonRows = getChunkComparisonRows(allChunkKeys, before, after);
|
||||
|
||||
const changedRows = allComparisonRows.filter((row) => row.changeType !== 'unchanged');
|
||||
|
|
@ -295,9 +295,9 @@ const startupTotal = {
|
|||
afterSize: startupComparisonRows.reduce((sum, row) => sum + row.afterSize, 0),
|
||||
};
|
||||
|
||||
const largeRows = comparisonRows
|
||||
.sort((a, b) => b.sortSize - a.sortSize || a.name.localeCompare(b.name))
|
||||
.slice(0, 30);
|
||||
//const largeRows = comparisonRows
|
||||
// .sort((a, b) => b.sortSize - a.sortSize || a.name.localeCompare(b.name))
|
||||
// .slice(0, 30);
|
||||
|
||||
const body = [
|
||||
marker,
|
||||
|
|
@ -319,13 +319,13 @@ const body = [
|
|||
'',
|
||||
'</details>',
|
||||
'',
|
||||
'<details>',
|
||||
`<summary>Largest</summary>`,
|
||||
'',
|
||||
markdownTable(largeRows),
|
||||
'',
|
||||
'</details>',
|
||||
'',
|
||||
//'<details>',
|
||||
//`<summary>Largest</summary>`,
|
||||
//'',
|
||||
//markdownTable(largeRows),
|
||||
//'',
|
||||
//'</details>',
|
||||
//'',
|
||||
].join('\n');
|
||||
|
||||
await fs.writeFile(outFile, body);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue