on master help sign in
Merge pull request #1385 from dalf/minor_changes
bc7c8a3Adam Tauber
manage.sh+11−2
@@ -5,8 +5,6 @@ BASE_DIR="$(dirname -- "`readlink -f -- "$0"`")"
5cd -- "$BASE_DIR"
5cd -- "$BASE_DIR"
6set -e
6set -e
7
7
8−export PATH="$(npm bin)":$PATH
9−
10# subshell
8# subshell
11PYTHONPATH="$BASE_DIR"
9PYTHONPATH="$BASE_DIR"
12SEARX_DIR="$BASE_DIR/searx"
10SEARX_DIR="$BASE_DIR/searx"
@@ -111,7 +109,14 @@ tests() {
111# Web
109# Web
112#
110#
113
111
112+npm_path_setup() {
113+ which npm || (printf 'Error: npm is not found\n'; exit 1)
114+ export PATH="$(npm bin)":$PATH
115+}
116+
114npm_packages() {
117npm_packages() {
118+ npm_path_setup
119+
115 echo '[!] install NPM packages'
120 echo '[!] install NPM packages'
116 cd -- "$BASE_DIR"
121 cd -- "$BASE_DIR"
117 npm install less@2.7 less-plugin-clean-css grunt-cli
122 npm install less@2.7 less-plugin-clean-css grunt-cli
@@ -126,10 +131,14 @@ npm_packages() {
126}
131}
127
132
128build_style() {
133build_style() {
134+ npm_path_setup
135+
129 lessc --clean-css="--s1 --advanced --compatibility=ie9" "$BASE_DIR/searx/static/$1" "$BASE_DIR/searx/static/$2"
136 lessc --clean-css="--s1 --advanced --compatibility=ie9" "$BASE_DIR/searx/static/$1" "$BASE_DIR/searx/static/$2"
130}
137}
131
138
132styles() {
139styles() {
140+ npm_path_setup
141+
133 echo '[!] Building legacy style'
142 echo '[!] Building legacy style'
134 build_style themes/legacy/less/style.less themes/legacy/css/style.css
143 build_style themes/legacy/less/style.less themes/legacy/css/style.css
135 build_style themes/legacy/less/style-rtl.less themes/legacy/css/style-rtl.css
144 build_style themes/legacy/less/style-rtl.less themes/legacy/css/style-rtl.css
searx/static/themes/simple/less/#toolkit_loader.less#deleted

No changes to the content.

searx/static/themes/simple/less/.#toolkit_loader.lessdeleted−1
@@ -1 +0,0 @@
1−alexandre@alf-laptop.2449:1533915028