searxng/utils/lib_sxng_themes.sh
Ivan Gabaldon a947d5b3cf [mod] theme/simple: improve fmt/lint tech
This is one of various PR to refactor the simple theme internally.

Replace eslint tool with Biome. I have been using this for quite some time, and
it will help us to have more consistent and valid code without extending on
other third party plugins.

Removes unused dependencies.
2025-07-03 17:35:05 +02:00

53 lines
972 B
Bash
Executable file

#!/usr/bin/env bash
# SPDX-License-Identifier: AGPL-3.0-or-later
themes.help(){
cat <<EOF
themes.:
all : test & build all themes
simple : test & build simple theme
lint : lint JS & CSS (LESS) files
fix : fix JS & CSS (LESS) files
test : test all themes
EOF
}
themes.all() {
( set -e
vite.simple.build
)
dump_return $?
}
themes.simple() {
( set -e
build_msg SIMPLE "theme: run build (simple)"
vite.simple.build
)
dump_return $?
}
themes.fix() {
( set -e
build_msg SIMPLE "theme: fix (all themes)"
vite.simple.fix
)
dump_return $?
}
themes.lint() {
( set -e
build_msg SIMPLE "theme: lint (all themes)"
vite.simple.lint
)
dump_return $?
}
themes.test() {
( set -e
# we run a build to test (in CI)
build_msg SIMPLE "theme: run build (to test)"
vite.simple.build
)
dump_return $?
}