mirror of https://github.com/searxng/searxng.git
commit
bc7c8a3973
13
manage.sh
13
manage.sh
|
@ -5,8 +5,6 @@ BASE_DIR="$(dirname -- "`readlink -f -- "$0"`")"
|
||||||
cd -- "$BASE_DIR"
|
cd -- "$BASE_DIR"
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
export PATH="$(npm bin)":$PATH
|
|
||||||
|
|
||||||
# subshell
|
# subshell
|
||||||
PYTHONPATH="$BASE_DIR"
|
PYTHONPATH="$BASE_DIR"
|
||||||
SEARX_DIR="$BASE_DIR/searx"
|
SEARX_DIR="$BASE_DIR/searx"
|
||||||
|
@ -111,7 +109,14 @@ tests() {
|
||||||
# Web
|
# Web
|
||||||
#
|
#
|
||||||
|
|
||||||
|
npm_path_setup() {
|
||||||
|
which npm || (printf 'Error: npm is not found\n'; exit 1)
|
||||||
|
export PATH="$(npm bin)":$PATH
|
||||||
|
}
|
||||||
|
|
||||||
npm_packages() {
|
npm_packages() {
|
||||||
|
npm_path_setup
|
||||||
|
|
||||||
echo '[!] install NPM packages'
|
echo '[!] install NPM packages'
|
||||||
cd -- "$BASE_DIR"
|
cd -- "$BASE_DIR"
|
||||||
npm install less@2.7 less-plugin-clean-css grunt-cli
|
npm install less@2.7 less-plugin-clean-css grunt-cli
|
||||||
|
@ -126,10 +131,14 @@ npm_packages() {
|
||||||
}
|
}
|
||||||
|
|
||||||
build_style() {
|
build_style() {
|
||||||
|
npm_path_setup
|
||||||
|
|
||||||
lessc --clean-css="--s1 --advanced --compatibility=ie9" "$BASE_DIR/searx/static/$1" "$BASE_DIR/searx/static/$2"
|
lessc --clean-css="--s1 --advanced --compatibility=ie9" "$BASE_DIR/searx/static/$1" "$BASE_DIR/searx/static/$2"
|
||||||
}
|
}
|
||||||
|
|
||||||
styles() {
|
styles() {
|
||||||
|
npm_path_setup
|
||||||
|
|
||||||
echo '[!] Building legacy style'
|
echo '[!] Building legacy style'
|
||||||
build_style themes/legacy/less/style.less themes/legacy/css/style.css
|
build_style themes/legacy/less/style.less themes/legacy/css/style.css
|
||||||
build_style themes/legacy/less/style-rtl.less themes/legacy/css/style-rtl.css
|
build_style themes/legacy/less/style-rtl.less themes/legacy/css/style-rtl.css
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
alexandre@alf-laptop.2449:1533915028
|
|
Loading…
Reference in New Issue