Skip to content

Commit 742bf2f

Browse files
authored
ci: Add bundlesize check to TravisCI
1 parent 4824023 commit 742bf2f

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@ addons:
1313
chrome: stable
1414
sauce_connect: true
1515
script:
16-
- npm run test
17-
- npm run test:ci
16+
- npm run test && npm run test:ci

package.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,18 @@
1818
"lint": "eslint .",
1919
"precommit": "lint-staged",
2020
"publish": "npm run test && grunt publish",
21-
"test": "npm run lint && grunt build.test && npm run test:unit && npm run test:integration && npm run test:typescript",
21+
"test": "npm run lint && npm run test:size && grunt build.test && npm run test:unit && npm run test:integration && npm run test:typescript",
2222
"test:unit": "mocha-chrome test/index.html",
2323
"test:integration": "mocha-chrome test/integration/index.html --chrome-flags '[\"--disable-web-security\"]' --ignore-resource-errors --ignore-exceptions",
2424
"test:typescript": "tsc --noEmit --noImplicitAny typescript/raven-tests.ts",
25-
"test:ci": "npm run lint && grunt test:ci"
25+
"test:ci": "npm run lint && grunt test:ci",
26+
"test:size": "grunt dist && bundlesize"
2627
},
2728
"devDependencies": {
2829
"bluebird": "^3.4.1",
2930
"browserify-versionify": "^1.0.6",
3031
"bundle-collapser": "^1.2.1",
32+
"bundlesize": "^0.15.2",
3133
"chai": "^4.1.1",
3234
"derequire": "2.0.3",
3335
"es6-promise": "^4.0.5",
@@ -67,5 +69,11 @@
6769
"git add"
6870
]
6971
},
70-
"typings": "typescript/raven.d.ts"
72+
"typings": "typescript/raven.d.ts",
73+
"bundlesize": [
74+
{
75+
"path": "./dist/raven.min.js",
76+
"maxSize": "10 kB"
77+
}
78+
]
7179
}

0 commit comments

Comments
 (0)