Skip to content

Commit

Permalink
chore: changed size-limit action (#1004)
Browse files Browse the repository at this point in the history
  • Loading branch information
semoal authored Mar 14, 2021
1 parent f426881 commit d66741d
Show file tree
Hide file tree
Showing 3 changed files with 1,227 additions and 26 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/size-limit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ on: [pull_request]
jobs:
size:
runs-on: ubuntu-latest
env:
CI_JOB_NUMBER: 1
steps:
- uses: actions/checkout@v2
- uses: preactjs/compressed-size-action@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
build-script: "release:build"
pattern: "./packages/**/build/cjs/*.production.min.js"
- uses: actions/checkout@v1
- uses: andresz1/size-limit-action@v1
with:
build_script: release:build
github_token: ${{ secrets.GITHUB_TOKEN }}
21 changes: 19 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"version:latest": "lerna version --force-publish --no-private --create-release github --conventional-commits --yes",
"release:latest": "lerna publish from-package --contents build --dist-tag latest --yes",
"release:next": "lerna publish from-package --contents build --canary --preid next --pre-dist-tag next --yes",
"build:docs": "cd docs && ./vercel-build.sh"
"build:docs": "cd docs && ./vercel-build.sh",
"size-limit": "size-limit"
},
"engines": {
"node": ">=10.0.0"
Expand All @@ -37,6 +38,7 @@
"@babel/preset-env": "^7.11.5",
"@babel/preset-react": "^7.10.4",
"@babel/preset-typescript": "^7.10.4",
"@size-limit/preset-small-lib": "^4.10.1",
"@testing-library/react": "^11.0.4",
"@types/babel-types": "^7.0.9",
"@types/jest": "^26.0.14",
Expand Down Expand Up @@ -92,6 +94,7 @@
"rollup-plugin-typescript2": "^0.27.3",
"semver": "^7.3.2",
"set-tz": "^0.2.0",
"size-limit": "^4.10.1",
"strip-ansi": "^6.0.0",
"targz": "^1.0.1",
"tmp": "^0.2.1",
Expand All @@ -106,5 +109,19 @@
"repository": {
"type": "git",
"url": "https://github.com/lingui/js-lingui.git"
}
},
"size-limit": [
{
"path": "./packages/core/build/cjs/core.production.min.js",
"limit": "3 kB"
},
{
"path": "./packages/detect-locale/build/cjs/detect-locale.production.min.js",
"limit": "1 kB"
},
{
"path": "./packages/react/build/cjs/react.production.min.js",
"limit": "5 kB"
}
]
}
Loading

1 comment on commit d66741d

@vercel
Copy link

@vercel vercel bot commented on d66741d Mar 14, 2021

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.