Skip to content

Commit

Permalink
adding size-limit (#391)
Browse files Browse the repository at this point in the history
  • Loading branch information
prabhuignoto authored Jul 3, 2023
1 parent 1281147 commit 5939681
Show file tree
Hide file tree
Showing 4 changed files with 353 additions and 11 deletions.
File renamed without changes.
28 changes: 28 additions & 0 deletions .github/workflows/size-limit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: 'size'
on:
pull_request:
branches:
- master
jobs:
size:
runs-on: ubuntu-latest
env:
CI_JOB_NUMBER: 1
steps:
- uses: pnpm/action-setup@v2
with:
version: 8.1.0

- uses: actions/checkout@v2

- name: Cache PNPM dependencies
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- uses: andresz1/size-limit-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
20 changes: 19 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
"clean": "npx concurrently \"pnpm format\" \"pnpm lint:all\"",
"test": "vitest --config vitest.config.ts",
"vite:build": "vite build --config vite.config.ts",
"coveralls": "pnpx coveralls < coverage/lcov.info"
"coveralls": "pnpx coveralls < coverage/lcov.info",
"size-limit": "pnpm rollup && pnpm size-limit",
"build": "pnpm rollup"
},
"dependencies": {
"classnames": "^2.3.2",
Expand Down Expand Up @@ -65,6 +67,7 @@
"@rollup/plugin-node-resolve": "^15.1.0",
"@rollup/plugin-strip": "^3.0.2",
"@rollup/plugin-terser": "^0.4.3",
"@size-limit/preset-big-lib": "^8.2.6",
"@testing-library/dom": "^9.3.1",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
Expand Down Expand Up @@ -115,6 +118,7 @@
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.35.0",
"sass": "^1.63.6",
"size-limit": "^8.2.6",
"snyk": "^1.1187.0",
"start-server-and-test": "^2.0.0",
"stylelint": "^15.9.0",
Expand All @@ -134,6 +138,20 @@
"files": [
"dist"
],
"size-limit": [
{
"path": "dist/react-chrono.js",
"limit": "50 KB"
},
{
"path": "dist/react-chrono.esm.js",
"limit": "50 KB"
},
{
"path": "dist/react-chrono.umd.js",
"limit": "50 KB"
}
],
"lint-staged": {
"src/components/**/*.{ts,tsx}": [
"prettier --write",
Expand Down
Loading

1 comment on commit 5939681

@vercel
Copy link

@vercel vercel bot commented on 5939681 Jul 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.