Skip to content

Commit 7e821ab

Browse files
committed
refactor: toggle exports
1 parent 0f40a63 commit 7e821ab

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

.github/workflows/size-report.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,3 @@ jobs:
6060
${{steps.size-markdown.outputs.content}}
6161
<!-- VUE_CORE_SIZE -->
6262
body-include: '<!-- VUE_CORE_SIZE -->'
63-
64-
# Test

scripts/size-report.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ import { existsSync } from 'node:fs'
77

88
const currDir = path.resolve('temp/size')
99
const prevDir = path.resolve('temp/size-prev')
10-
let output = '## Size Report\n'
10+
let output = '## Size Report\n\n'
1111

1212
run()
1313

1414
async function run() {
15-
await processExports()
16-
await renderBaseline()
1715
await renderFiles()
16+
await renderBaseline()
17+
await processExports()
1818

1919
process.stdout.write(output)
2020
}
@@ -75,13 +75,13 @@ async function renderBaseline() {
7575
async function processExports() {
7676
const curr = await importJSON(path.resolve(currDir, '_exports.json'))
7777
const prev = await importJSON(path.resolve(prevDir, '_exports.json'))
78-
output += '\n### Exports\n\n'
78+
output += '\n### Exports\n\n<details>\n\n'
7979
if (prev) {
8080
output += renderExports(curr, prev)
8181
}
8282
output += `\n\n<details>\n<summary>Show full exports</summary>\n\n${renderExports(
8383
curr
84-
)}\n\n</details>\n\n`
84+
)}\n\n</details>\n</details>\n\n`
8585
}
8686

8787
/** @typedef {Record<string, import('@sxzz/export-size').ExportsInfo>} ExportMap */

0 commit comments

Comments
 (0)