github.com/hernad/nomad@v1.6.112/scripts/vagrant-linux-unpriv-ui.sh (about) 1 #!/usr/bin/env bash 2 # Copyright (c) HashiCorp, Inc. 3 # SPDX-License-Identifier: MPL-2.0 4 5 6 export NODE_VERSION=18.16.1 7 8 # Install NVM for simple node.js version management 9 curl -sSL --fail -o- https://raw.githubusercontent.com/creationix/nvm/v0.36.0/install.sh | bash 10 11 # This enables NVM without a logout/login 12 export NVM_DIR="${HOME}/.nvm" 13 # shellcheck source=/dev/null 14 [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm 15 16 # Install Node, Ember CLI, and Phantom for UI development 17 # Use exact full version version (e.g. not 12) for reproducibility purposes 18 nvm install "${NODE_VERSION}" 19 nvm alias default "${NODE_VERSION}" 20 21 # Remove any other version of node installed 22 find ~/.nvm/versions/node -not -name "v${NODE_VERSION}" -depth 1 -exec rm -rf {} \; 23 24 npm install -g ember-cli 25 26 # Install Yarn for front-end dependency management 27 curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.22.5