From 5244963a46843e4fa2888c4ed981b1aa47dd563d Mon Sep 17 00:00:00 2001 From: Benjamin Barenblat Date: Wed, 22 Dec 2021 15:55:51 -0500 Subject: Minify JavaScript and manifest.json in uploads --- Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index ce0ef3e..a7c32c0 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ # Copyright 2019 Google LLC +# Copyright 2021 Benjamin Barenblat # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of @@ -14,11 +15,11 @@ NAME = disable_keyboard_shortcuts -FILES = background.js manifest.json icon128.png icon48.png - -$(NAME).zip: $(FILES) +$(NAME).zip: background.js manifest.json icon128.png icon48.png mkdir $(NAME) - cp -al $(FILES) $(NAME) + uglifyjs background.js -m -o $(NAME)/background.js + jq -Sc . manifest.json >$(NAME)/manifest.json + cp -al icon128.png icon48.png $(NAME) zip -9r $(NAME) $(NAME) $(RM) -r $(NAME) -- cgit v1.2.3