use size-limit to track gzip size of the van#163
use size-limit to track gzip size of the van#163btakita wants to merge 2 commits intovanjs-org:mainfrom
Conversation
|
In Line 17 in d5c6076 Every release (indeed for every meaningful change to I am not sure whether the extra benefit of |
|
It's beneficial for contributors to have an automated test suite that runs before commits. Something like |
|
I'm not concerned either way what tech is used. But just wanted to point out the utility of the DX. |
|
Thanks @btakita for introducing the benefit! However, I noticed that the current limit in the I'm okay with manually tracking the size changes for now (in every release announcement, I talked about the size impact if there is any). If there are tools that help automate the process, I'm open to it, but the result from the tool needs to align with the actual size we're getting for VanJS. |
|
I think the npm script will have to run the build & call size-limit on the build output. |
devDependencies ∋ size-limit ∋ @size-limit/preset-small-lib publish.sh: fix: build on linux systems
|
I updated the branch to run size-limit on
|
| @@ -1,4 +1,4 @@ | |||
| import van from "./van-1.2.5.js" | |||
| import van from "./van.js" | |||
There was a problem hiding this comment.
I think this change is a bug?
| @@ -1,3 +1,4 @@ | |||
| "use strict"; | |||
| "type": "module", | ||
| "scripts": { | ||
| "test": "echo \"Error: no test specified\" && exit 1" | ||
| "test": "(cd ./src; ./publish.sh) && npm run test:size", |
There was a problem hiding this comment.
Could you change it to build? The command doesn't run any browser-based tests. Thus the name test could be misleading.
I did some work on the https://github.com/nanostores/nanostores library. The library author wrote the
size-limitlibrary to track the gzip size of the library as changes are made. It's been useful for contributors to optimize the size of the library & to track the size impact of changes.npm test:size # or size-limit