-
-
Notifications
You must be signed in to change notification settings - Fork 598
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ci: compare bundle size * chore: change name of task * for SDGs * Revert "for SDGs" This reverts commit 7861d1a. * add gitignore * update * fix
- Loading branch information
Showing
4 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
generated | ||
!generated/.gitkeep |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import * as fs from 'node:fs/promises' | ||
|
||
async function main() { | ||
const currentResult = (await fs.readFile('./generated/after.js')).byteLength | ||
let previousResult: number | null = null | ||
try { | ||
previousResult = (await fs.readFile('./generated/before.js')).byteLength | ||
} catch (e) {} | ||
const table = ['| | Current | Previous |', '| --- | --- | --- |'] | ||
table.push(`| Bundle Size | ${currentResult} | ${previousResult || 'N/A'} |`) | ||
console.log(table.join('\n')) | ||
} | ||
|
||
main() |