Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/glacials/dotfiles. my dotfiles (.vimrc, .bashrc, etc.)
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839#!/bin/bash
set -euo pipefailtest -z ${DEBUG:-} || set -xuname=$(uname -s | tr "[:upper:]" "[:lower:]")DOTFILES_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
if [[ $uname == linux ]]; thenexit 0fi
# This script installs JavaScript and several tools in the JavaScript ecosystem.echo "Installing JavaScript and friends"
. $DOTFILES_DIR/functions.sh
if [[ $uname == linux ]]; then curl -fsSL https://github.com/nodenv/nodenv-installer/raw/HEAD/bin/nodenv-installer | bashelse install_now nodenvfi
# Modern way to install yarncorepack enable
latest=$(\nodenv install --list 2>/dev/null | \sed -n '/^[[:space:]]*[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}[[:space:]]*$/ h;${g;p;}' \)nodenv install --skip-existing $latestnodenv global $latest
install_now npmnpm install -g \bower `# package manager` \prettier `# code formatter` \prettier-plugin-go-template `# format go templates in HTML` \typescript `# typed JavaScript`