@@ -30,6 +30,7 @@ help:
3030 @echo ' project - re-build generic files of the searx project'
3131 @echo ' themes - re-build build the source of the themes'
3232 @echo ' docker - build Docker image'
33+ @echo ' node.env - download & install npm dependencies locally'
3334 @echo ''
3435 @$(MAKE) -s -f utils/makefile.include make-help
3536 @echo ''
@@ -42,7 +43,7 @@ PHONY += uninstall
4243uninstall: pyenvuninstall
4344
4445PHONY += clean
45−clean: pyclean
46+clean: pyclean node.clean
4647 $(call cmd,common_clean)
4748
4849PHONY += run
@@ -89,6 +90,22 @@ searx.brand:
8990 $(Q)echo "DOCS_URL = '$(DOCS_URL)'" >> searx/brand.py
9091 $(Q)echo "PUBLIC_INSTANCES = 'https://searx.space'" >> searx/brand.py
9192
93+# node / npm
94+# ----------
95+
96+node.env:
97+ $(Q)./manage.sh npm_packages
98+
99+node.clean:
100+ $(Q)echo "CLEAN locally installed npm dependencies"
101+ $(Q)rm -rf \
102+ ./node_modules \
103+ ./package-lock.json \
104+ ./searx/static/themes/oscar/package-lock.json \
105+ ./searx/static/themes/oscar/node_modules \
106+ ./searx/static/themes/simple/package-lock.json \
107+ ./searx/static/themes/simple/node_modules
108+
92109# build themes
93110# ------------
94111
@@ -97,11 +114,11 @@ themes: themes.oscar themes.simple
97114
98115themes.oscar:
99116 $(Q)echo '[!] Grunt build : oscar theme'
100− $(Q)grunt --gruntfile "searx/static/themes/oscar/gruntfile.js"
117+ $(Q)PATH="$$(npm bin):$$PATH" grunt --gruntfile "searx/static/themes/oscar/gruntfile.js"
101118
102119themes.simple:
103120 $(Q)echo '[!] Grunt build : simple theme'
104− $(Q)grunt --gruntfile "searx/static/themes/simple/gruntfile.js"
121+ $(Q)PATH="$$(npm bin):$$PATH" grunt --gruntfile "searx/static/themes/simple/gruntfile.js"
105122
106123# docker
107124# ------