diff options
| author | XhmikosR <[email protected]> | 2017-09-27 16:20:46 +0300 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2017-10-01 12:01:27 -0700 |
| commit | a143f82ccd1113540f98bb43af4be25abbd4c91c (patch) | |
| tree | 58c233a6f541701e436a094339034f04e0ffa5f1 /package.json | |
| parent | 961750e01bb141f216dc81f989cbb86e210f7b8a (diff) | |
| download | bootstrap-a143f82ccd1113540f98bb43af4be25abbd4c91c.tar.xz bootstrap-a143f82ccd1113540f98bb43af4be25abbd4c91c.zip | |
Add bundlesize.
Diffstat (limited to 'package.json')
| -rw-r--r-- | package.json | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/package.json b/package.json index d0dfbe9d8..8f7196851 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ ], "scripts": { "bash": "bash", + "bundlesize": "bundlesize", "css": "npm-run-all --parallel css-lint* css-compile* --sequential css-prefix* css-minify*", "css-main": "npm-run-all --parallel css-lint css-compile --sequential css-prefix css-minify", "css-docs": "npm-run-all --parallel css-lint-docs css-compile-docs --sequential css-prefix-docs css-minify-docs", @@ -56,7 +57,7 @@ "release-version": "node build/change-version.js", "release-zip": "cd dist/ && zip -r9 bootstrap-$npm_package_version-dist.zip * && shx mv bootstrap-$npm_package_version-dist.zip ..", "dist": "npm-run-all --parallel css js", - "test": "npm-run-all dist --parallel js-test --sequential docs-compile docs-lint", + "test": "npm-run-all dist --parallel js-test --sequential docs-compile docs-lint bundlesize", "watch": "npm-run-all --parallel watch-css watch-js", "watch-css": "nodemon --ignore js/ --ignore dist/ -e scss -x \"npm run css\"", "watch-js": "nodemon --ignore scss/ --ignore js/dist/ --ignore dist/ -e js -x \"npm-run-all --parallel js-compile-*\"" @@ -84,6 +85,7 @@ "babel-plugin-external-helpers": "^7.0.0-beta.0", "babel-plugin-transform-es2015-modules-strip": "^0.1.1", "babel-preset-env": "^2.0.0-beta.0", + "bundlesize": "^0.14.4", "clean-css-cli": "^4.1.6", "cross-env": "^5.0.5", "eslint": "^4.2.0", @@ -131,6 +133,28 @@ "Android >= 4.4", "Opera >= 30" ], + "bundlesize": [ + { + "path": "./dist/css/bootstrap*.css", + "maxSize": "25 kB" + }, + { + "path": "./dist/js/bootstrap.bundle.js", + "maxSize": "50 kB" + }, + { + "path": "./dist/js/bootstrap.bundle.min.js", + "maxSize": "25 kB" + }, + { + "path": "./dist/js/bootstrap.js", + "maxSize": "20 kB" + }, + { + "path": "./dist/js/bootstrap.min.js", + "maxSize": "15 kB" + } + ], "jspm": { "registry": "npm", "main": "js/bootstrap", |
