Skip to content

Commit

Permalink
Merge pull request #4177 from vltansky/size-limit-ci
Browse files Browse the repository at this point in the history
ci: size-limit
  • Loading branch information
vltansky authored Feb 2, 2021
2 parents 5208b1a + 8d26bed commit 955543e
Show file tree
Hide file tree
Showing 4 changed files with 1,263 additions and 26 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/size-limit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
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 }}
build_script: build:prod
134 changes: 134 additions & 0 deletions .size-limit.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
module.exports = [
{
path: 'package/swiper-bundle.js',
name: 'bundle',
limit: '40 KB',
},
{
path: 'package/swiper.esm.js',
name: 'ESM bundle',
import:
'SwiperCore, { Navigation, Pagination, Virtual, Keyboard, Mousewheel, Scrollbar, Parallax, Zoom, Lazy, Controller, A11y, History, HashNavigation, Autoplay, EffectFade, EffectCube, EffectFlip, EffectCoverflow, Thumbs }',
limit: '40 KB',
},
{
path: 'package/swiper.esm.js',
name: 'Core',
import: 'SwiperCore',
limit: '20 KB',
},
{
path: 'package/swiper.esm.js',
name: 'Navigation',
import: '{ Navigation }',
limit: '5 KB',
},
{
path: 'package/swiper.esm.js',
name: 'Pagination',
import: '{ Pagination }',
limit: '7 KB',
},
{
path: 'package/swiper.esm.js',
name: 'Virtual',
import: '{ Virtual }',
limit: '6 KB',
},
{
path: 'package/swiper.esm.js',
name: 'Keyboard',
import: '{ Keyboard }',
limit: '5 KB',
},
{
path: 'package/swiper.esm.js',
name: 'Mousewheel',
import: '{ Mousewheel }',
limit: '7 KB',
},
{
path: 'package/swiper.esm.js',
name: 'Scrollbar',
import: '{ Scrollbar }',
limit: '7 KB',
},
{
path: 'package/swiper.esm.js',
name: 'Parallax',
import: '{ Parallax }',
limit: '8 KB',
},
{
path: 'package/swiper.esm.js',
name: 'Zoom',
import: '{ Zoom }',
limit: '7 KB',
},
{
path: 'package/swiper.esm.js',
name: 'Lazy',
import: '{ Lazy }',
limit: '7 KB',
},
{
path: 'package/swiper.esm.js',
name: 'Controller',
import: '{ Controller }',
limit: '2 KB',
},
{
path: 'package/swiper.esm.js',
name: 'A11y',
import: '{ A11y }',
limit: '7 KB',
},
{
path: 'package/swiper.esm.js',
name: 'History',
import: '{ History }',
limit: '3 KB',
},
{
path: 'package/swiper.esm.js',
name: 'HashNavigation',
import: '{ HashNavigation }',
limit: '6 KB',
},
{
path: 'package/swiper.esm.js',
name: 'Autoplay',
import: '{ Autoplay }',
limit: '3 KB',
},
{
path: 'package/swiper.esm.js',
name: 'EffectFade',
import: '{ EffectFade }',
limit: '2 KB',
},
{
path: 'package/swiper.esm.js',
name: 'EffectCube',
import: '{ EffectCube }',
limit: '7 KB',
},
{
path: 'package/swiper.esm.js',
name: 'EffectFlip',
import: '{ EffectFlip }',
limit: '7 KB',
},
{
path: 'package/swiper.esm.js',
name: 'EffectCoverflow',
import: '{ EffectCoverflow }',
limit: '7 KB',
},
{
path: 'package/swiper.esm.js',
name: 'Thumbs',
import: '{ Thumbs }',
limit: '7 KB',
},
];
Loading

0 comments on commit 955543e

Please sign in to comment.