Commit e7fbefa8 authored by Markus Heiser's avatar Markus Heiser

build: move build styles from manage.sh to Makefile

To build all styles use:

  make styles

To build individual styles use one of:

  make style.legacy
  make style.courgette
  make style.pixart
  make style.bootstrap
Signed-off-by: 's avatarMarkus Heiser <markus.heiser@darmarit.de>
parent 6846402d
......@@ -128,6 +128,31 @@ themes.simple:
$(Q)echo '[!] Grunt build : simple theme'
$(Q)PATH="$$(npm bin):$$PATH" grunt --gruntfile "searx/static/themes/simple/gruntfile.js"
# build styles
# ------------
PHONY += styles style.legacy style.courgette style.pixart style.bootstrap
styles: style.legacy style.courgette style.pixart style.bootstrap
quiet_cmd_lessc = STYLE $3
cmd_lessc = PATH="$$(npm bin):$$PATH" \
lessc --clean-css="--s1 --advanced --compatibility=ie9" "searx/static/$2" "searx/static/$3"
style.legacy:
$(call cmd,lessc,themes/legacy/less/style-rtl.less,themes/legacy/css/style-rtl.css)
$(call cmd,lessc,themes/legacy/less/style.less,themes/legacy/css/style.css)
style.courgette:
$(call cmd,lessc,themes/courgette/less/style.less,themes/courgette/css/style.css)
$(call cmd,lessc,themes/courgette/less/style-rtl.less,themes/courgette/css/style-rtl.css)
style.pixart:
$(call cmd,lessc,themes/pix-art/less/style.less,themes/pix-art/css/style.css)
style.bootstrap:
$(call cmd,lessc,less/bootstrap/bootstrap.less,css/bootstrap.min.css)
# docker
# ------
......
......@@ -130,27 +130,6 @@ npm_packages() {
npm install
}
build_style() {
npm_path_setup
lessc --clean-css="--s1 --advanced --compatibility=ie9" "$BASE_DIR/searx/static/$1" "$BASE_DIR/searx/static/$2"
}
styles() {
npm_path_setup
echo '[!] Building legacy style'
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
echo '[!] Building courgette style'
build_style themes/courgette/less/style.less themes/courgette/css/style.css
build_style themes/courgette/less/style-rtl.less themes/courgette/css/style-rtl.css
echo '[!] Building pix-art style'
build_style themes/pix-art/less/style.less themes/pix-art/css/style.css
echo '[!] Building bootstrap style'
build_style less/bootstrap/bootstrap.less css/bootstrap.min.css
}
docker_build() {
# Check if it is a git repository
if [ ! -d .git ]; then
......@@ -241,7 +220,6 @@ Commands
Build
-----
locales - Compile locales
styles - Build less files
Tests
-----
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment