blob: d188fe5031ca08463e5801fe3a4f3cb8ca01f261 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
#!/usr/bin/env bash
# SPDX-License-Identifier: AGPL-3.0-or-later
vite.help(){
cat <<EOF
vite.: .. to be done ..
simple.:
build: build static files of the simple theme
dev: start development server
EOF
}
VITE_SIMPLE_THEME="${REPO_ROOT}/client/simple"
VITE_SIMPLE_DIST="${REPO_ROOT}/searx/static/themes/simple"
vite.simple.dev() {
( set -e
build_msg SIMPLE "start server for FE development of: ${VITE_SIMPLE_THEME}"
pushd "${VITE_SIMPLE_THEME}"
npm install
npm exec -- vite
popd &> /dev/null
)
}
vite.simple.build() {
# build static files of the simple theme
( set -e
build_msg SIMPLE "run build of theme from: ${VITE_SIMPLE_THEME}"
pushd "${VITE_SIMPLE_THEME}"
npm install
npm run fix
npm run icons.html
npm run build
)
}
|