Skip to content

Commit

Permalink
ci(tests): add bundlesize test to avoid accidental bundle size increase
Browse files Browse the repository at this point in the history
  • Loading branch information
Benedikt Rötsch authored and axe312ger committed Oct 17, 2017
1 parent ae6aa2b commit eddf6c4
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"docs:publish": "npm run docs:build && ./node_modules/contentful-sdk-jsdoc/bin/publish-docs.sh contentful.js contentful",
"lint": "eslint lib test",
"pretest": "npm run lint",
"test": "npm run test:cover && npm run test:integration && npm run test:browser-local && npm run test:size",
"test:ci": "npm run build && ./node_modules/contentful-sdk-core/bin/test-ci.sh",
"test:cover": "BABEL_ENV=test babel-node ./node_modules/istanbul/lib/cli.js cover ./test/runner | tap-spec",
"test:unit": "BABEL_ENV=test babel-node ./test/runner | tap-spec",
Expand All @@ -36,11 +37,11 @@
"test:browser-local": "BABEL_ENV=test karma start karma.conf.local.js",
"test:browser-remote": "BABEL_ENV=test karma start karma.conf.saucelabs.js",
"test:simulate-ci": "trevor",
"test:size": "bundlesize",
"vendor:version": "echo \"module.exports = '`cat package.json|json version`'\" > version.js",
"browser-coverage": "npm run test:cover && opener coverage/lcov-report/index.html",
"prepublish": "in-publish && npm run build:ci || not-in-publish",
"postpublish": "npm run docs:publish && npm run clean",
"test": "npm run test:cover && npm run test:integration && npm run test:browser-local",
"semantic-release": "semantic-release pre && npm publish && semantic-release post",
"devdep:build": "pushd ../contentful-sdk-core && npm run build && popd",
"devdep:clean": "pushd ../contentful-sdk-core && npm run clean && popd",
Expand Down Expand Up @@ -80,6 +81,7 @@
"babel-types": "^6.22.0",
"babili-webpack-plugin": "^0.1.2",
"blue-tape": "^1.0.0",
"bundlesize": "^0.12.0",
"contentful-sdk-jsdoc": "^2.2.0",
"coveralls": "^2.11.9",
"cz-conventional-changelog": "^2.0.0",
Expand Down Expand Up @@ -119,5 +121,15 @@
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
},
"bundlesize": [
{
"path": "./dist/contentful.js",
"maxSize": "75Kb"
},
{
"path": "./dist/contentful.min.js",
"maxSize": "26Kb"
}
]
}

0 comments on commit eddf6c4

Please sign in to comment.