Skip to main content

Local Setup


Getting Started

Setup zsh/nvm

  1. Check / Set home folder I sometime see people use long username in home folder. I usually go with short and easy to remember username. Mine is sakko. To check, type open terminal and type pwd
pwd
/Users/sakko

If it's not what you like, find a way to change it now before continuing. It will be extremely difficult to change this after a few months.

  1. Install Xcode Command Line Tools (Mac-Only) Open terminal and type
xcode-select --install

Then click install to continue

  1. Configure git config Open terminal and input these (replace your name and email)
git config --global user.name "John Doe"
git config --global user.email "john.doe@gmail.com"
  1. Setup global .gitignores Mac has some annoying files that can be ignored by git. Let's add them.
nano ~/.gitignore

Then add these:

# Node
npm-debug.log
# Mac
.DS_Store
.AppleDouble
.LSOverride
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
# Windows
Thumbs.db
# WebStorm
.idea/

After you are done, activate this globally by running:

git config --global core.excludesfile ~/.gitignore
  1. install oh my zsh Fully explained here https://github.com/robbyrussell/oh-my-zsh For quick installation, just run:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

then restart terminal.

  1. Install NVM For nodejs development, open https://github.com/nvm-sh/nvm copy the installation line (eg.)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash

Open ~/.zshrc and see if these lines are present. (if not, add it)

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion

Restart terminal then install nodejs (only the version you use)

nvm install --lts # this will install latest

Verify it worked, and the version is correct:

node --version
  1. Install build-essential
sudo apt-get install build-essential
  1. Install Typescript We are planning on leveraging Typescript.
npm install -g typescript
  1. We use yarn over npm, so install yarn if you don't have it
npm install --global yarn

If you already have yarn installed, the latest versoin as of April 2022 we are using is yarn berry. To switch to that version, do:

yarn policies set-version berry
  1. Setup up optional swag: