-
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?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,8 @@ | |
}, | ||
"type": "module", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"test": "(cd ./src; ./publish.sh) && npm run test:size", | ||
"test:size": "size-limit" | ||
}, | ||
"keywords": [ | ||
"Van", | ||
|
@@ -35,9 +36,11 @@ | |
"author": "Tao Xin", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@size-limit/preset-small-lib": "^9.0.0", | ||
"all-contributors-cli": "^6.26.1", | ||
"esbuild": "^0.17.12", | ||
"node-jq": "^2.3.5", | ||
"size-limit": "^9.0.0", | ||
"terser": "^5.22.0", | ||
"typescript": "^5.1.6" | ||
}, | ||
|
@@ -49,5 +52,12 @@ | |
"url": "https://github.com/vanjs-org/van/issues", | ||
"email": "[email protected]" | ||
}, | ||
"homepage": "https://vanjs.org" | ||
"homepage": "https://vanjs.org", | ||
"size-limit": [ | ||
{ | ||
"name": "Van", | ||
"path": "public/van-latest.min.js", | ||
"limit": "962 B" | ||
} | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. I think this change is a bug? |
||
|
||
// If this variable is set to an Array, we will push the error message into the array instead of | ||
// throwing an error. This is useful in testing, to capture the error occurred asynchronous to the initiating | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
"use strict"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What caused the change here? |
||
(() => { | ||
// van.js | ||
var Obj = Object; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
"use strict"; | ||
(() => { | ||
// van.js | ||
var Obj = Object; | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
"use strict"; | ||
(() => { | ||
// van.js | ||
var Obj = Object; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
"use strict"; | ||
(() => { | ||
// van.js | ||
var Obj = Object; | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "es2020", | ||
"target": "es2017", | ||
"skipLibCheck": true | ||
}, | ||
"files": [ | ||
"./van.test.ts" | ||
] | ||
} |
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 nametest
could be misleading.