mirror of
https://github.com/searxng/searxng.git
synced 2025-01-15 21:05:27 +00:00
[mod] slightly improve make node.clean themes.all
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
5a1a43ef74
commit
e4f8f0483f
4 changed files with 36 additions and 26 deletions
|
@ -39,10 +39,8 @@ to our ":ref:`how to contribute`" guideline.
|
||||||
- :ref:`make themes`
|
- :ref:`make themes`
|
||||||
|
|
||||||
If you implement themes, you will need to setup a :ref:`Node.js environment
|
If you implement themes, you will need to setup a :ref:`Node.js environment
|
||||||
<make node.env>`: ``make node.env``
|
<make node.env>`. Before you call *make run* (2.), you need to compile the
|
||||||
|
modified styles and JavaScript: ``make node.clean themes.all``
|
||||||
Before you call *make run* (2.), you need to compile the modified styles and
|
|
||||||
JavaScript: ``make themes.all``
|
|
||||||
|
|
||||||
Alternatively you can also compile selective the theme you have modified,
|
Alternatively you can also compile selective the theme you have modified,
|
||||||
e.g. the *simple* theme.
|
e.g. the *simple* theme.
|
||||||
|
|
11
manage
11
manage
|
@ -94,8 +94,6 @@ pyenv.:
|
||||||
OK : test if virtualenv is OK
|
OK : test if virtualenv is OK
|
||||||
format.:
|
format.:
|
||||||
python : format Python code source using black
|
python : format Python code source using black
|
||||||
pygments.:
|
|
||||||
less : build LESS files for pygments
|
|
||||||
EOF
|
EOF
|
||||||
go.help
|
go.help
|
||||||
node.help
|
node.help
|
||||||
|
@ -253,15 +251,6 @@ gecko.driver() {
|
||||||
dump_return $?
|
dump_return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
pygments.less() {
|
|
||||||
build_msg PYGMENTS "searxng_extra/update/update_pygments.py"
|
|
||||||
if ! pyenv.cmd python searxng_extra/update/update_pygments.py; then
|
|
||||||
build_msg PYGMENTS "building LESS files for pygments failed"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
py.build() {
|
py.build() {
|
||||||
build_msg BUILD "python package ${PYDIST}"
|
build_msg BUILD "python package ${PYDIST}"
|
||||||
pyenv.cmd python setup.py \
|
pyenv.cmd python setup.py \
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|
||||||
|
declare _Blue
|
||||||
|
declare _creset
|
||||||
|
|
||||||
export NODE_MINIMUM_VERSION="16.13.0"
|
export NODE_MINIMUM_VERSION="16.13.0"
|
||||||
|
|
||||||
node.help(){
|
node.help(){
|
||||||
|
@ -22,7 +25,7 @@ nodejs.ensure() {
|
||||||
node.env() {
|
node.env() {
|
||||||
nodejs.ensure
|
nodejs.ensure
|
||||||
( set -e
|
( set -e
|
||||||
build_msg INSTALL "./searx/static/themes/simple/package.json"
|
build_msg INSTALL "[npm] ./searx/static/themes/simple/package.json"
|
||||||
npm --prefix searx/static/themes/simple install
|
npm --prefix searx/static/themes/simple install
|
||||||
)
|
)
|
||||||
dump_return $?
|
dump_return $?
|
||||||
|
@ -30,7 +33,7 @@ node.env() {
|
||||||
|
|
||||||
node.env.dev() {
|
node.env.dev() {
|
||||||
nodejs.ensure
|
nodejs.ensure
|
||||||
build_msg INSTALL "./package.json: developer and CI tools"
|
build_msg INSTALL "[npm] ./package.json: developer and CI tools"
|
||||||
npm install
|
npm install
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,11 +44,19 @@ node.clean() {
|
||||||
fi
|
fi
|
||||||
build_msg CLEAN "themes -- locally installed npm dependencies"
|
build_msg CLEAN "themes -- locally installed npm dependencies"
|
||||||
( set -e
|
( set -e
|
||||||
npm --prefix searx/static/themes/simple run clean
|
npm --prefix searx/static/themes/simple run clean \
|
||||||
|
| prefix_stdout "${_Blue}CLEAN ${_creset} "
|
||||||
|
if [ "${PIPESTATUS[0]}" -ne "0" ]; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
)
|
)
|
||||||
build_msg CLEAN "locally installed developer and CI tools"
|
build_msg CLEAN "locally installed developer and CI tools"
|
||||||
( set -e
|
( set -e
|
||||||
npm --prefix . run clean
|
npm --prefix . run clean \
|
||||||
|
| prefix_stdout "${_Blue}CLEAN ${_creset} "
|
||||||
|
if [ "${PIPESTATUS[0]}" -ne "0" ]; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
)
|
)
|
||||||
dump_return $?
|
dump_return $?
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,16 +9,14 @@ themes.help(){
|
||||||
themes.:
|
themes.:
|
||||||
all : build all themes
|
all : build all themes
|
||||||
live : to get live builds of CSS & JS use 'LIVE_THEME=simple make run'
|
live : to get live builds of CSS & JS use 'LIVE_THEME=simple make run'
|
||||||
simple.:
|
simple.: build simple theme
|
||||||
build : build simple theme
|
|
||||||
test : test simple theme
|
test : test simple theme
|
||||||
|
pygments: build pygment's LESS files for simple theme
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
themes.all() {
|
themes.all() {
|
||||||
( set -e
|
( set -e
|
||||||
pygments.less
|
|
||||||
node.env
|
|
||||||
themes.simple
|
themes.simple
|
||||||
)
|
)
|
||||||
dump_return $?
|
dump_return $?
|
||||||
|
@ -50,15 +48,29 @@ themes.live() {
|
||||||
|
|
||||||
themes.simple() {
|
themes.simple() {
|
||||||
( set -e
|
( set -e
|
||||||
|
node.env
|
||||||
|
themes.simple.pygments
|
||||||
|
)
|
||||||
build_msg GRUNT "theme: simple"
|
build_msg GRUNT "theme: simple"
|
||||||
npm --prefix searx/static/themes/simple run build
|
npm --prefix searx/static/themes/simple run build
|
||||||
)
|
|
||||||
dump_return $?
|
dump_return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
themes.simple.pygments() {
|
||||||
|
build_msg PYGMENTS "searxng_extra/update/update_pygments.py"
|
||||||
|
pyenv.cmd python searxng_extra/update/update_pygments.py \
|
||||||
|
| prefix_stdout "${_Blue}PYGMENTS ${_creset} "
|
||||||
|
if [ "${PIPESTATUS[0]}" -ne "0" ]; then
|
||||||
|
build_msg PYGMENTS "building LESS files for pygments failed"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
themes.simple.test() {
|
themes.simple.test() {
|
||||||
build_msg TEST "theme: simple"
|
build_msg TEST "theme: simple"
|
||||||
nodejs.ensure
|
node.env
|
||||||
npm --prefix searx/static/themes/simple install
|
npm --prefix searx/static/themes/simple install
|
||||||
npm --prefix searx/static/themes/simple run test
|
npm --prefix searx/static/themes/simple run test
|
||||||
dump_return $?
|
dump_return $?
|
||||||
|
|
Loading…
Reference in a new issue