From fb21cad83c593bdf7d946a5702ea57842db64499 Mon Sep 17 00:00:00 2001 From: Tsu-ba-me Date: Thu, 3 Mar 2022 14:01:53 -0500 Subject: [PATCH] chore(striker-ui-api): add scripts to compress and decompress build output --- striker-ui-api/package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/striker-ui-api/package.json b/striker-ui-api/package.json index b8d6638a..14d34694 100644 --- a/striker-ui-api/package.json +++ b/striker-ui-api/package.json @@ -4,7 +4,9 @@ "description": "API for striker-ui", "scripts": { "build": "pkg --compress GZip --output striker-ui-api --targets node14-linux index.js", - "clean": "rm -f striker-ui-api", + "build:clean": "rm -f striker-ui-api", + "compress": "[[ -e striker-ui-api ]] && XZ_OPT='--verbose -9e' tar --create --verbose --xz --file striker-ui-api.tar.xz striker-ui-api || echo 'Cannot find output of build.' && exit 1", + "decompress": "tar --extract --verbose --file striker-ui-api.tar.xz", "dev": "node index.js", "rebuild": "npm run clean && npm run build", "start": "npm run build && ./striker-ui-api",