94efefc7bf
10 funciones Bash del dominio infra: instaladores de herramientas de desarrollo (install_go, install_nodejs, install_pnpm, install_python312, install_uv, install_volta, install_wails), diagnostico del sistema (analyze_disk_space, detect_wsl, list_listening_ports). Automatizan la configuracion del entorno de desarrollo en Linux/WSL.
1.3 KiB
1.3 KiB
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, params, output, tested, tests, test_file_path, file_path, source_repo, source_license, source_file
| name | kind | lang | domain | version | purity | signature | description | tags | uses_functions | uses_types | returns | returns_optional | error_type | imports | params | output | tested | tests | test_file_path | file_path | source_repo | source_license | source_file | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| install_nodejs | function | bash | infra | 1.0.0 | impure | install_nodejs([version: string]) -> void | Instala Node.js en Linux usando nvm. Instala nvm v0.39.7 si no está presente. Instala la versión de Node indicada, la activa con 'nvm use' y la configura como default. Idempotente si nvm ya está instalado. |
|
false | error_go_core |
|
progreso a stdout con versión instalada; exit code 1 si nvm no queda disponible | false | bash/functions/infra/install_nodejs.sh | https://gitea-dgg044oo04woo4ggcsws4gk0.organic-machine.com/egutierrez/DevLauncher.git | MIT | scripts/linux/instaladores/instalar_nodejs.sh |
Ejemplo
source bash/functions/infra/install_nodejs.sh
# Instalar Node.js 20 (LTS por defecto)
install_nodejs
# Instalar versión específica
install_nodejs 18
install_nodejs 21
Notas
Requiere curl. nvm se instala en $HOME/.nvm. Después de instalar en una sesión nueva, hay que recargar el shell para que los comandos node y npm queden disponibles globalmente.