Updated tools.func (markdown)

Michel Roegl-Brunner 2025-05-15 11:58:54 +02:00
parent 02d742e393
commit ec2fa06962

@ -2,13 +2,13 @@
The tools.func file is automatically sourced and can be used in all **$APP-install.sh** files.
## `install_node_and_modules` Bash Function
## `install_node_and_modules`
This function automates the installation of a specified version of Node.js and a list of global Node modules on a Debian-based system. It ensures the desired Node.js version is installed (replacing any existing version if necessary) and installs or updates specified Node.js global modules.
---
### 🧰 Function Description
### Description
`install_node_and_modules()`:
@ -19,7 +19,7 @@ This function automates the installation of a specified version of Node.js and a
---
### 🚀 How to Use/Example
### Usage
```bash
install_node_and_modules
@ -31,7 +31,7 @@ If you want to define a specified Version and install Modules use something like
NODE_VERSION=20 NODE_MODULE="yarn@latest,@vue/cli-service@5.0.0" install_node_and_modules
```
### 🧩 User-Configurable Variables
### User-Configurable Variables
| Variable | Description | Default Value |
|----------------|----------------------------------------------------------------------------------------------------------------|---------------|
@ -39,14 +39,14 @@ NODE_VERSION=20 NODE_MODULE="yarn@latest,@vue/cli-service@5.0.0" install_node_an
| `NODE_MODULE` | Comma-separated list of global npm modules to install or update. <br>Examples: <br>`yarn@latest` <br>`@vue/cli-service@5.0.0` <br>`typescript` | *(empty)* |
### 🔧 Notes
### Notes
Global npm packages are only processed if NODE_MODULE is set.
If the requested module version is already installed, it is skipped.
Modules are updated if the installed version does not match the requested one (unless latest is used).
On failure, the script exits with exit 1.
## 🐘 `install_postgresql`
## `install_postgresql`
### Overview