[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-ops-www] 04/05: feat: properly build css on make install
From: |
gnunet |
Subject: |
[taler-taler-ops-www] 04/05: feat: properly build css on make install |
Date: |
Sat, 24 Feb 2024 21:34:48 +0100 |
This is an automated email from the git hooks/post-receive script.
nora pushed a commit to branch master
in repository taler-ops-www.
commit 821ae494c849f679f12d44642660d0284fb0ced0
Author: Nullptrderef <nullptrderef@national.shitposting.agency>
AuthorDate: Sat Feb 24 21:34:19 2024 +0100
feat: properly build css on make install
---
Makefile | 5 ++++-
bootstrap | 13 +++----------
build-system/pkgmgr | 16 ++++++++++++++++
3 files changed, 23 insertions(+), 11 deletions(-)
diff --git a/Makefile b/Makefile
index a19ad83..2ff8d3f 100644
--- a/Makefile
+++ b/Makefile
@@ -4,10 +4,13 @@ include build-system/config.mk
# All: build HTML pages in all languages.
.PHONY: all
-all:
+all: preprocess
./inc/update-messages
env "BASEURL=$(opt_baseurl)" ./inc/build-site
+preprocess:
+ env "NODE_ENV=production" ./build-system/pkgmgr build:scss;
+
.PHONY: run
run: all
$(browser) http://0.0.0.0:8000/en &
diff --git a/bootstrap b/bootstrap
index ffb7d61..7b60458 100755
--- a/bootstrap
+++ b/bootstrap
@@ -16,18 +16,11 @@ git submodule update --init;
git submodule update --recursive;
git submodule sync;
-# Get the package manager to use - there's almost definitely a better way to
do this but im lazy
-PACKAGE_MANAGER=pnpm; # Default to pnpm
-if ! which $PACKAGE_MANAGER > /dev/null; then # Fallback to plain npm
- PACKAGE_MANAGER=npm;
- if which $PACKAGE_MANAGER > /dev/null; then
- echo "neither pnpm nor npm is installed" 1>&2;
- exit 1;
- fi;
-fi;
+# Ensure a package manager is installed; this will write to stderr and exit if
there isn't
+./build-system/pkgmgr --version;
# Install NPM Dependencies
-NODE_ENV=development $PACKAGE_MANAGER i;
+NODE_ENV=development ./build-system/pkgmgr i;
# Copy over some files
cp build-system/taler-build-scripts/configure ./configure || true
diff --git a/build-system/pkgmgr b/build-system/pkgmgr
new file mode 100755
index 0000000..1df397b
--- /dev/null
+++ b/build-system/pkgmgr
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+set -eu;
+
+# Get the package manager to use - there's almost definitely a better way to
do this but im lazy
+PACKAGE_MANAGER=pnpm; # Default to pnpm
+if ! which $PACKAGE_MANAGER > /dev/null; then # Fallback to plain npm
+ PACKAGE_MANAGER=npm;
+ if which $PACKAGE_MANAGER > /dev/null; then
+ echo "neither pnpm nor npm is installed" 1>&2;
+ exit 1;
+ fi;
+fi;
+
+# Run the manager
+$PACKAGE_MANAGER $@;
+exit $?;
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.