Skip to content
Permalink
Browse files

chore(protos): added minification to reduce package size

* chore(deps): upgraded packages + setup proto minifier

* chore(protos): minified compiled proto files
  • Loading branch information...
kritzware committed Jun 6, 2019
1 parent 76519aa commit ac5edd8a8711fcb438b64f38405930a2ce751969
Showing 1,154 changed files with 726 additions and 577,443 deletions.
@@ -101,4 +101,28 @@ clean:
rm -rf $(OUT_DIR)/*
mkdir -p $(OUT_DIR)

.PHONY: protos enums
minify:
echo "compressing protobufjs definitions";
uglifyjs src/protos/compiled-resources.js -o src/protos/compiled-resources.js --compress

for file in $(OUT_DIR)/google/ads/googleads/$(ADS_VERSION)/**/*.js; do \
echo "compressing $$(basename $$file)"; \
uglifyjs $$file -o $$file --compress; \
done; \

for file in $(OUT_DIR)/google/**/*.js; do \
echo "compressing $$(basename $$file)"; \
uglifyjs $$file -o $$file --compress; \
done; \

for file in $(OUT_DIR)/google/api/experimental/*.js; do \
echo "compressing $$(basename $$file)"; \
uglifyjs $$file -o $$file --compress; \
done; \

echo "removing empty files";
find src/protos/ -size 0 -delete

echo "finished compressing protos";

.PHONY: protos enums minify
@@ -36,8 +36,8 @@
"@types/protobufjs": "^6.0.0",
"cosmiconfig": "^5.2.0",
"google-auth-library": "^3.1.0",
"google-protobuf": "^3.7.0-rc.2",
"grpc": "^1.18.0",
"google-protobuf": "^3.8.0",
"grpc": "^1.21.1",
"lodash.camelcase": "^4.3.0",
"lodash.get": "^4.4.2",
"lodash.set": "^4.3.2",
@@ -62,7 +62,8 @@
"tslint": "^5.11.0",
"tslint-config-prettier": "^1.17.0",
"tslint-immutable": "^5.0.0",
"typescript": "^3.1.6"
"typescript": "^3.1.6",
"uglify-js": "^3.6.0"
},
"config": {
"commitizen": {

0 comments on commit ac5edd8

Please sign in to comment.
You can’t perform that action at this time.