summaryrefslogtreecommitdiff
path: root/manage
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2022-01-22 09:26:17 +0100
committerMartin Fischer <martin@push-f.com>2022-01-24 07:51:31 +0100
commit309147d86f08f69ce1467aa4d25d3d6a56b2bc46 (patch)
treeb6c46c9adf42940570059cdf1344a7913f099d2c /manage
parentcac03529860e0fd19585b35a66f5de4f0ea0559d (diff)
[mod] introduce node.env.devtools function
Diffstat (limited to 'manage')
-rwxr-xr-xmanage12
1 files changed, 9 insertions, 3 deletions
diff --git a/manage b/manage
index 45853de3..6cc98c1b 100755
--- a/manage
+++ b/manage
@@ -20,6 +20,8 @@ source "$(dirname "${BASH_SOURCE[0]}")/utils/lib_go.sh"
# shellcheck source=utils/lib_redis.sh
source "$(dirname "${BASH_SOURCE[0]}")/utils/lib_redis.sh"
+PATH="${REPO_ROOT}/node_modules/.bin:${PATH}"
+
# config
PYOBJECTS="searx"
@@ -559,6 +561,12 @@ node.env() {
dump_return $?
}
+node.env.devtools() {
+ nodejs.ensure
+ build_msg INSTALL "package.json: developer and CI tools"
+ npm install
+}
+
node.clean() {
if ! required_commands npm 2>/dev/null; then
build_msg CLEAN "npm is not installed / ignore npm dependencies"
@@ -683,11 +691,9 @@ test.pylint() {
dump_return $?
}
-
test.pyright() {
build_msg TEST "[pyright] static type check of python sources"
- nodejs.ensure
- npm install
+ node.env.devtools
# We run Pyright in the virtual environment because Pyright
# executes "python" to determine the Python version.
pyenv.cmd npx --no-install pyright -p pyrightconfig-ci.json