Skip to content

Commit

Permalink
Add size-limit (mobxjs#1292)
Browse files Browse the repository at this point in the history
  • Loading branch information
pustovalov authored and xaviergonz committed May 19, 2019
1 parent 3574985 commit 7b1ccfa
Show file tree
Hide file tree
Showing 4 changed files with 2,745 additions and 58 deletions.
14 changes: 13 additions & 1 deletion .circleci/config.yml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,14 @@ jobs:
- store_test_results:
path: ./test-results

test-size:
executor: my-executor
steps:
- attach_workspace:
at: .

- run: yarn size

# upload coverage
upload-coveralls:
executor: my-executor
Expand All @@ -120,7 +128,7 @@ jobs:
name: upload coveralls
command: |
if [[ -v COVERALLS_REPO_TOKEN ]]
then
then
cat ./packages/mobx-state-tree/coverage/lcov.info ./packages/mst-middlewares/coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
echo "Coveralls info uploaded"
else
Expand Down Expand Up @@ -150,6 +158,10 @@ workflows:
requires:
- build

- test-size:
requires:
- build

- upload-coveralls:
requires:
- test-mst-dev
Expand Down
14 changes: 14 additions & 0 deletions .size-limit.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"path": "packages/mobx-state-tree/dist/mobx-state-tree.min.js",
"limit": "25 KB",
"webpack": false,
"running": false
},
{
"path": "packages/mst-middlewares/dist/mst-middlewares.min.js",
"limit": "5 KB",
"webpack": false,
"running": false
}
]
2 changes: 2 additions & 0 deletions package.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"test:mst:others": "cd packages/mobx-state-tree && yarn test:others",
"test:mst-middlewares:dev": "cd packages/mst-middlewares && yarn test:dev",
"test:mst-middlewares:prod": "cd packages/mst-middlewares && yarn test:prod",
"size": "size-limit",
"coverage": "lerna run coverage --stream",
"release": "yarn build && lerna publish",
"tag-new-version": "lerna version"
Expand All @@ -30,6 +31,7 @@
"lerna": "^3.13.1",
"lint-staged": "^8.1.5",
"prettier": "^1.16.4",
"size-limit": "^1.3.2",
"tslint": "^5.14.0",
"tslint-config-prettier": "^1.18.0",
"typescript": "^3.3.3333"
Expand Down
Loading

0 comments on commit 7b1ccfa

Please sign in to comment.