diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2020-03-25 16:38:52 +0100 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2020-03-25 16:38:52 +0100 |
commit | d471ec86dd72cfae80bdaf72b1ed266b1a8cada7 (patch) | |
tree | 56a583c874bc214ff79cbf3e3a06c3db7ad70e95 /Makefile | |
parent | 2d12f221a7afbbbaedfb27c5705efd8b94ad6a81 (diff) | |
download | searxng-d471ec86dd72cfae80bdaf72b1ed266b1a8cada7.tar.gz searxng-d471ec86dd72cfae80bdaf72b1ed266b1a8cada7.zip |
Makefile: add target node.env - download & install npm dependencies
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 23 |
1 files changed, 20 insertions, 3 deletions
@@ -30,6 +30,7 @@ help: @echo ' project - re-build generic files of the searx project' @echo ' themes - re-build build the source of the themes' @echo ' docker - build Docker image' + @echo ' node.env - download & install npm dependencies locally' @echo '' @$(MAKE) -s -f utils/makefile.include make-help @echo '' @@ -42,7 +43,7 @@ PHONY += uninstall uninstall: pyenvuninstall PHONY += clean -clean: pyclean +clean: pyclean node.clean $(call cmd,common_clean) PHONY += run @@ -89,6 +90,22 @@ searx.brand: $(Q)echo "DOCS_URL = '$(DOCS_URL)'" >> searx/brand.py $(Q)echo "PUBLIC_INSTANCES = 'https://searx.space'" >> searx/brand.py +# node / npm +# ---------- + +node.env: + $(Q)./manage.sh npm_packages + +node.clean: + $(Q)echo "CLEAN locally installed npm dependencies" + $(Q)rm -rf \ + ./node_modules \ + ./package-lock.json \ + ./searx/static/themes/oscar/package-lock.json \ + ./searx/static/themes/oscar/node_modules \ + ./searx/static/themes/simple/package-lock.json \ + ./searx/static/themes/simple/node_modules + # build themes # ------------ @@ -97,11 +114,11 @@ themes: themes.oscar themes.simple themes.oscar: $(Q)echo '[!] Grunt build : oscar theme' - $(Q)grunt --gruntfile "searx/static/themes/oscar/gruntfile.js" + $(Q)PATH="$$(npm bin):$$PATH" grunt --gruntfile "searx/static/themes/oscar/gruntfile.js" themes.simple: $(Q)echo '[!] Grunt build : simple theme' - $(Q)grunt --gruntfile "searx/static/themes/simple/gruntfile.js" + $(Q)PATH="$$(npm bin):$$PATH" grunt --gruntfile "searx/static/themes/simple/gruntfile.js" # docker # ------ |