diff --git a/.env.example b/.env.example index d201dfe..40535db 100644 --- a/.env.example +++ b/.env.example @@ -13,4 +13,6 @@ INSTALLER=yarn # E.g: prod, dev ENV=prod +NODE_VERSION=22 + USE_SUBMODULES=false diff --git a/setup/functions.sh b/setup/functions.sh index d957dba..c92b886 100644 --- a/setup/functions.sh +++ b/setup/functions.sh @@ -14,6 +14,13 @@ build_fe() { home_resource_env + if ! command -v nvm &> /dev/null; then + # shellcheck disable=SC2155 + export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" + [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" + fi + nvm use "$NODE_VERSION" + if ! command -v yarn &> /dev/null; then echo ' ∟ Installing yarn...' npm install -g yarn