From 2bf77f5d2db2a33828beff402f7f18443204595d Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Wed, 5 Feb 2025 16:49:06 +0100 Subject: [web-client] integrate the migrated theme in the development workflows Signed-off-by: Markus Heiser --- utils/lib_sxng_themes.sh | 78 +++++------------------------------------------- 1 file changed, 7 insertions(+), 71 deletions(-) (limited to 'utils/lib_sxng_themes.sh') diff --git a/utils/lib_sxng_themes.sh b/utils/lib_sxng_themes.sh index 059f9c86f..23faf0e4b 100755 --- a/utils/lib_sxng_themes.sh +++ b/utils/lib_sxng_themes.sh @@ -1,100 +1,36 @@ #!/usr/bin/env bash # SPDX-License-Identifier: AGPL-3.0-or-later -declare _Blue -declare _creset - themes.help(){ cat <&1 \ - # | prefix_stdout "${_Blue}THEME ${1} ${_creset} " \ - # | grep -E --ignore-case --color 'error[s]?[:]? |warning[s]?[:]? |' -} - -themes.simple() { - ( set -e - themes.simple.pygments - build_msg SIMPLE "theme: run build" - # "run build" includes tests from eslint and stylelint - npm --prefix searx/static/themes/simple run build + # we run a build to test (in CI) + build_msg SIMPLE "theme: run build (to test)" + vite.simple.build ) dump_return $? } - -themes.simple.pygments() { - build_msg PYGMENTS "searxng_extra/update/update_pygments.py" - pyenv.cmd python searxng_extra/update/update_pygments.py \ - | prefix_stdout "${_Blue}PYGMENTS ${_creset} " - if [ "${PIPESTATUS[0]}" -ne "0" ]; then - build_msg PYGMENTS "building LESS files for pygments failed" - return 1 - fi - return 0 -} - -themes.simple.fix() { - build_msg SIMPLE "theme: fix" - npm --prefix searx/static/themes/simple run fix - dump_return $? -} - -themes.simple.test() { - build_msg SIMPLE "theme: run test" - npm --prefix searx/static/themes/simple run test - dump_return $? -} -- cgit v1.2.3