Skip to content

Commit

Permalink
feat: add size-limit (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
mochaaP authored Nov 27, 2021
1 parent d4ee4e5 commit bf26d2b
Show file tree
Hide file tree
Showing 3 changed files with 274 additions and 48 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/size-limit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: "size"
on:
pull_request:
branches:
- master
jobs:
size:
runs-on: ubuntu-latest
env:
CI_JOB_NUMBER: 1
steps:
- uses: actions/checkout@v1
- uses: andresz1/size-limit-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"@cloudflare/wrangler": "1.19.5",
"@commitlint/cli": "15.0.0",
"@commitlint/config-conventional": "15.0.0",
"@size-limit/preset-small-lib": "^7.0.3",
"@tsconfig/recommended": "1.0.1",
"@typescript-eslint/eslint-plugin": "5.4.0",
"esbuild": "0.14.0",
Expand All @@ -25,6 +26,7 @@
"husky": "7.0.4",
"lint-staged": "12.1.2",
"prettier": "2.5.0",
"size-limit": "7.0.3",
"standard-version": "9.3.2",
"typescript": "4.5.2"
},
Expand All @@ -48,11 +50,15 @@
},
"scripts": {
"build": "rimraf dist && esbuild --bundle src/index.ts --minify --sourcemap --outfile=dist/index.js",
"size": "yarn build && size-limit",
"lint": "eslint ./src --fix",
"prerelease": "yarn lint && yarn build",
"release": "standard-version",
"postrelease": "git push --follow-tags"
},
"size-limit": [{
"path": "dist/index.js"
}],
"husky": {
"hooks": {
"pre-commit": [
Expand Down
Loading

0 comments on commit bf26d2b

Please sign in to comment.