-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use size-limit to track gzip size of the van #163
base: main
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this change is a bug?
@@ -1,3 +1,4 @@ | |||
"use strict"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What caused the change here?
@@ -16,7 +16,8 @@ | |||
}, | |||
"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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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-limit
library 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