I use Linux Mint as my daily OS at home.
I use Windows as my daily OS at work.
And I use both for web development.
I don’t own a Mac, so I can’t say for sure that this guide will work for those, but it shouldn’t be too far off - if at all.
Whatever operating system you use, I trust that you know your way around it well enough that I don’t have to tell you how to install and configure software.
With that in mind, I’ll give you a high-level rundown of how I have my development environment setup.
For all practical purposes, it’s probably easier if you install Node, Git, and VS Code first, and then use your Bash (Git Bash) terminal to find your config files, and VS Code to edit them.
You can easily find the config files listed below by opening a bash terminal and typing:
cd
ls -al
and look for the files (.bashrc, .gitconfig, .npmrc).
If VS Code is installed, you should be able to open each file with the code command.
If you’re running Linux or Mac, then you probably already have bash (or something like it - zsh) installed.
If you’re on Windows, then you will have installed Bash when you installed Git For Windows.
If you have zsh or csh or something else, then you will need to edit your .zshrc, or whatever respective rc file your terminal uses.
Here I’m showing you how to export tab-completeable shortcuts that you can use instead of having to type out the full path every time you cd to a folder, or run a command.
I make full use of the aliases so that I don’t have to type out repetitive commands, and some of them I don’t use often enough to memorize them so I just type something and hit tab a couple times to see what my options are, which is a quick way to get a reminder of things I’ve aliased.
.bashrc
.bashrc
”~/.bashrc”
export PATH="$HOME/npm/bin:$HOME/bin:$HOME/.local/bin:$PATH"export PROJECTS="$HOME/dev/projects"export UTILS="$PROJECTS/utils"export NGCOMMON="$PROJECTS/ng-common"export NGSCHEMATICS="$PROJECTS/ng-schematics"alias ls="ls -a --color"alias editbashrc="code ~/.bashrc"alias editnpmrc="code ~/.npmrc"alias editgitconfig="code ~/.gitconfig"alias refreshbashrc=". ~/.bashrc"alias updatenpm="npm i -g npm"alias updatenpmcheckupdates="npm i -g npm-check-updates"alias updateangularcli="npm i -g @angular/cli@latest"alias nbuild="npm run build"alias nstart="npm start"alias ntest="npm test"alias ntestcov="npm run test:cov"alias ntestfile="npm run test:file"alias nlint="npm run lint"alias ncypress="npm run cypress"alias npushpatch="npm run push:patch"alias npushminor="npm run push:minor"alias npushmajor="npm run push:major"alias npmi="npm install --ignore-scripts"alias niutils="npm i -S @bjanderson/utils@latest"alias niclitool="npm i -g @bjanderson/cli-tool@latest"alias nimoneytoolshared="npm i -S @bjanderson/moneytool-shared@latest"alias ningcommon="npm i -S @bjanderson/ng-common@latest"alias ningschematics="npm i -D @bjanderson/ng-schematics@latest"alias ngcomponent="ng g @bjanderson/ng-schematics:component -n"alias ngdialog="ng g @bjanderson/ng-schematics:dialog -n"alias ngmodel="ng g @bjanderson/ng-schematics:model -n"alias ngservice="ng g @bjanderson/ng-schematics:service -n"alias ngstore="ng g @bjanderson/ng-schematics:store -n"alias ngtable="ng g @bjanderson/ng-schematics:table -n"alias ngtablewithdatasource="ng g @bjanderson/ng-schematics:table-with-data-source -n"alias ngtablewithserversidedatasource="ng g @bjanderson/ng-schematics:table-with-server-side-data-source -n"alias ngjest="ng g @bjanderson/ng-schematics:setup-jest"alias gs="git status"alias ga="git add -A"alias gc="git commit -m"alias gcamend="git commit --amend --no-edit"alias gcmaster="git checkout master"alias gcdev="git checkout dev"alias gcedits="git checkout edits"alias gmedits="git merge edits"alias gbdedits="git branch -d edits"alias gcbedits="git checkout -b edits"alias gnewedits="git branch -d edits && git checkout -b edits"function parse_git_branch () { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'}BLUE="\[\033[01;34m\]"GREEN="\[\033[0;32m\]"RED="\[\033[0;31m\]"WHITE="\[\033[0m\]"YELLOW="\[\033[0;33m\]"PS1="$BLUE\W$YELLOW\$(parse_git_branch)$BLUE\$$WHITE "
The installer for VS Code is pretty straight forward too. Just grab the installer from the home page and follow the prompts when you run it. Make sure to select the option to include code in your PATH and to allow it to open files and folders from the right-click menu.
Extensions
VS Code Extensions
Angular Language Service: angular.ng-template
EditorConfig for VS Code: editorconfig.editorconfig