Skip to content

Commit 14d5387

Browse files
committed
chore: Add size limit
1 parent 4e69eea commit 14d5387

3 files changed

Lines changed: 264 additions & 15 deletions

File tree

.github/workflows/size-limit.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# https://github.com/andresz1/size-limit-action
2+
name: "CI (size-limit)"
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
jobs:
8+
size:
9+
runs-on: ubuntu-latest
10+
env:
11+
CI_JOB_NUMBER: 1
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: andresz1/size-limit-action@v1.7.0
15+
with:
16+
github_token: ${{ secrets.GITHUB_TOKEN }}

package.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"@rollup/plugin-typescript": "^11.1.5",
4343
"@semantic-release/changelog": "^6.0.3",
4444
"@semantic-release/git": "^10.0.1",
45+
"@size-limit/preset-small-lib": "^10.0.1",
4546
"@types/jest": "^29.5.6",
4647
"@types/node": "^20.8.9",
4748
"@types/proper-lockfile": "^4.1.3",
@@ -67,6 +68,7 @@
6768
"rollup-plugin-dts": "^6.1.0",
6869
"rollup-plugin-node-globals": "^1.4.0",
6970
"semantic-release": "^22.0.5",
71+
"size-limit": "^10.0.1",
7072
"ts-jest": "^29.1.1",
7173
"tslib": "^2.6.2",
7274
"typedoc": "^0.25.2",
@@ -93,5 +95,11 @@
9395
"bugs": {
9496
"url": "https://github.com/neet/masto.js/issues"
9597
},
96-
"homepage": "https://github.com/neet/masto.js#readme"
98+
"homepage": "https://github.com/neet/masto.js#readme",
99+
"size-limit": [
100+
{
101+
"limit": "7.5 kB",
102+
"path": "./dist/index.js"
103+
}
104+
]
97105
}

0 commit comments

Comments
 (0)