Skip to content

Commit

Permalink
Add library size check in CI (#741)
Browse files Browse the repository at this point in the history
* add bundlesize to tests

* Upgrade bundlesize to 0.5.6

* Loose the brackets
  • Loading branch information
siddharthkp authored and developit committed Jul 1, 2017
1 parent f3d0047 commit 8a729f9
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@
"minify": "uglifyjs dist/preact.js -c collapse_vars,evaluate,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code -m -o dist/preact.min.js -p relative --in-source-map dist/preact.js.map --source-map dist/preact.min.js.map",
"strip": "jscodeshift --run-in-band -s -t config/codemod-strip-tdz.js dist/preact.dev.js && jscodeshift --run-in-band -s -t config/codemod-const.js dist/preact.dev.js",
"size": "node -e \"process.stdout.write('gzip size: ')\" && gzip-size dist/preact.min.js",
"test": "npm-run-all lint --parallel test:mocha test:karma test:ts",
"test": "npm-run-all lint --parallel test:mocha test:karma test:ts test:size",
"test:ts": "tsc -p test/ts/",
"test:mocha": "mocha --recursive --compilers js:babel/register test/shared test/node",
"test:karma": "karma start test/karma.conf.js --single-run",
"test:mocha:watch": "npm run test:mocha -- --watch",
"test:karma:watch": "npm run test:karma -- no-single-run",
"test:size": "bundlesize",
"lint": "eslint debug devtools src test",
"prepublish": "npm run build",
"smart-release": "npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish",
Expand Down Expand Up @@ -72,6 +73,7 @@
"babel-eslint": "^6.1.0",
"babel-loader": "^5.3.2",
"babel-runtime": "^5.8.24",
"bundlesize": "^0.5.7",
"chai": "^3.4.1",
"copyfiles": "^1.0.0",
"core-js": "^2.4.1",
Expand Down Expand Up @@ -120,5 +122,11 @@
"babel-runtime",
"jscodeshift"
]
}
},
"bundlesize": [
{
"path": "./dist/preact.min.js",
"threshold": "4Kb"
}
]
}

0 comments on commit 8a729f9

Please sign in to comment.