From f8075fac4a60f4d1cab095cfec1aa81d299ab2a3 Mon Sep 17 00:00:00 2001 From: Adnan Maolood Date: Mon, 20 Feb 2023 14:56:42 -0500 Subject: [PATCH] srht/Makefile: Use minify cli to minify CSS https://github.com/tdewolff/minify minify is available in Alpine Linux package repositories. This also removes a build-time dependency on node. --- setup.py | 3 -- srht/Makefile | 4 +- srht/package-lock.json | 113 ----------------------------------------- srht/package.json | 11 ---- 4 files changed, 1 insertion(+), 130 deletions(-) delete mode 100644 srht/package-lock.json delete mode 100644 srht/package.json diff --git a/setup.py b/setup.py index 8eb0187..8ed604c 100755 --- a/setup.py +++ b/setup.py @@ -5,9 +5,6 @@ import glob import os import sys -if subprocess.call(["npm", "i"], cwd="srht") != 0: - sys.exit(1) - ver = os.environ.get("PKGVER") or subprocess.run(['git', 'describe', '--tags'], stdout=subprocess.PIPE).stdout.decode().strip() diff --git a/srht/Makefile b/srht/Makefile index 9588cdf..a60f82e 100644 --- a/srht/Makefile +++ b/srht/Makefile @@ -26,9 +26,7 @@ $(MODULE)static/main.css: scss/*.scss ${SRHT_PATH}/scss/*.scss sassc -I${SRHT_PATH}/scss scss/main.scss $@ $(MODULE)static/main.min.css: $(MODULE)static/main.css - node ${SRHT_PATH}/node_modules/clean-css-cli/bin/cleancss \ - -o static/main.min.css \ - static/main.css + minify -o static/main.min.css static/main.css cp static/main.min.css \ static/main.min.$$(sha256sum static/main.min.css | cut -c1-8).css diff --git a/srht/package-lock.json b/srht/package-lock.json deleted file mode 100644 index 0ec8e85..0000000 --- a/srht/package-lock.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "name": "srht", - "version": "1.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "clean-css": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.1.11.tgz", - "integrity": "sha1-Ls3xRaujj1R0DybO/Q/z4D4SXWo=", - "requires": { - "source-map": "0.5.x" - } - }, - "clean-css-cli": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/clean-css-cli/-/clean-css-cli-4.1.11.tgz", - "integrity": "sha1-AcVonwW8USojKF8d79veALwR2Gw=", - "requires": { - "clean-css": "^4.1.9", - "commander": "2.x", - "glob": "7.x" - } - }, - "commander": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", - "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==" - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - } - } -} diff --git a/srht/package.json b/srht/package.json deleted file mode 100644 index 5fcfa8c..0000000 --- a/srht/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "srht", - "version": "1.0.0", - "description": "Dummy package for build deps", - "author": "Drew DeVault ", - "license": "GPL-2.0", - "dependencies": { - "clean-css": "^4.1.11", - "clean-css-cli": "^4.1.11" - } -} -- 2.45.2