From 5afb0a258c131d1c39cca9e97aef5273a556c642 Mon Sep 17 00:00:00 2001 From: Raya Straus Date: Tue, 7 Apr 2020 17:04:34 +0300 Subject: [PATCH] Added bundlewatch --- bundlewatch.config.js | 15 +++++++++++++++ package.json | 4 +++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 bundlewatch.config.js diff --git a/bundlewatch.config.js b/bundlewatch.config.js new file mode 100644 index 00000000..689abec6 --- /dev/null +++ b/bundlewatch.config.js @@ -0,0 +1,15 @@ +const bundlewatchConfig = { + files: [ + { + path: './dist/angular-cld/bundles/cloudinary-angular-5.x.umd.js', + maxSize: '30kb' + }, + { + path: './dist/angular-cld/fesm5/cloudinary-angular-5.x.js', + maxSize: '25kb' + } + ], + defaultCompression: 'gzip', +}; + +module.exports = bundlewatchConfig; diff --git a/package.json b/package.json index 6ac26dcc..a2e7ff23 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "install-sample-from-source": "node ./scripts/install-sample-from-source.js samples/photo_album", "install-sample-from-source:jquery": "node ./scripts/install-sample-from-source.js samples/photo_album_with_jquery", "build": "ng build angular-cld && npm run copy-lib-assets", - "copy-lib-assets": "cp \"LICENSE\" \"CHANGELOG.md\" \"dist/angular-cld\"" + "copy-lib-assets": "cp \"LICENSE\" \"CHANGELOG.md\" \"dist/angular-cld\"", + "bundlewatch": "bundlewatch --config bundlewatch.config.js" }, "private": true, "dependencies": { @@ -34,6 +35,7 @@ "@types/jasmine": "~2.8.6", "@types/jasminewd2": "~2.0.3", "@types/node": "~8.9.4", + "bundlewatch": "^0.2.6", "cloudinary-core": "^2.8.1", "codelyzer": "~4.2.1", "jasmine-core": "~2.99.1",