File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -91,8 +91,11 @@ export function main() {
9191 <thead><tr><th>File</th><th>Diff (B)</th><th>Diff (%)</th></tr></thead>
9292 <tbody>` ;
9393 for ( const [ file , details ] of files . entries ( ) ) {
94+ const packageName = file . split ( '/' ) [ 1 ] ;
95+ const fileShort = file . replace ( `src/${ packageName } /assets/dist/` , '' ) ;
96+ output += `<tr><td colspan="3"><b>${ packageName } </b></td></tr>` ;
9497 output += `<tr>
95- <td><code>${ file } </code> ${ details . state === 'added' ? '(new)' : ( details . state === 'removed' ? '(deleted)' : '' ) } </td>
98+ <td><code>${ fileShort } </code> ${ details . state === 'added' ? '(new)' : ( details . state === 'removed' ? '(deleted)' : '' ) } </td>
9699 <td>
97100 Size: <code>${ formatBytes ( base [ file ] ?. size || 0 ) } </code> → <code>${ formatBytes ( pr [ file ] ?. size || 0 ) } </code><br>
98101 Gzip: <code>${ formatBytes ( base [ file ] ?. size_gz || 0 ) } </code> → <code>${ formatBytes ( pr [ file ] ?. size_gz || 0 ) } </code><br>
Original file line number Diff line number Diff line change @@ -3,9 +3,8 @@ name: Dist Files Size Diff
33on :
44 pull_request :
55 paths :
6- - ' src/*/**'
7- - ' !src/*/doc/**'
8- - ' .github/**'
6+ - ' src/*/assets/dist/**'
7+ - ' src/*/src/Bridge/*/assets/dist/**'
98
109jobs :
1110 dist-files-size-diff :
6059 with :
6160 result-encoding : string
6261 script : |
62+ console.log(context);
6363 const { main } = await import('${{ github.workspace }}/.github/generate-dist-files-size-diff.mjs')
6464
6565 return await main()
You can’t perform that action at this time.
0 commit comments