Skip to content

Instantly share code, notes, and snippets.

@dlerm
Last active October 18, 2023 16:12
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save dlerm/c9bd9eaab46a3024481eb803477f4ed2 to your computer and use it in GitHub Desktop.
Save dlerm/c9bd9eaab46a3024481eb803477f4ed2 to your computer and use it in GitHub Desktop.
Dev tools install script

DevBox Instructions

  1. Move this folder to ~/Desktop
  2. Open terminal
  3. Navigate terminal to this folder: cd ~/Desktop/dev-box
  4. Run command: chmod +x ~/Desktop/dev-box/dev-box.sh to allow execution of the install script
  5. Run command: ./dev-box.sh to start the install script
  6. Let the process run. Near the end there are a few y/n (yes or no) prompts. Press key y/n to accept or not
  7. A folder called "Sites" will be created for you (within your user directory) to store project repos in
  8. After the script is finished you should be able to use the Mac search (top right) and see the following installed:
    • *Note: If any of these are missing run the command in parenthesis*
    • iTerm (brew cask install iterm)
    • Google Chrome (brew cask install google-chrome)
    • Slack (brew cask install slack)
    • Zeplin (brew cask install zeplin)
    • [Optional] Sublime (brew cask install sublime-text)
    • [Optional] VS Code (brew cask install visual-studio-code)
  9. Finally, you may need to restart your machine to ensure all updates take effect

What's included

  • Git command line tools (Xcode)
  • Homebrew package manager
  • NodeJS
  • Yarn (global)
  • Gulp (global)
  • Bower (global)
  • Multiple linter packages (global)
    • stylelint
    • eslint
    • prettier
    • stylelint-scss
    • stylelint-order
    • eslint-config-airbnb
    • eslint-config-prettier
    • eslint-config-airbnb-base
    • eslint-plugin-prettier
    • eslint-plugin-import
    • eslint-plugin-jsx-a11y
    • eslint-plugin-react
  • Multiple desktop applications
    • iTerm
    • Google Chrome
    • Slack
    • Zeplin
    • [Optional] Sublime Text
    • [Optional] VS Code
  • Oh My Zsh (Z Shell)
#!/usr/bin/env bash
# Install Xcode
# Install Homebrew
# Install Node
# Install Yarn
# Install Gulp
# Install Bower
# Install Linters
# Set OS defaults
# Install Desktop Applications
# Setup Projects Folder
# Install Oh-My-Zsh
# Ask for the administrator password upfront
sudo -v
echo "------------------------------"
echo "Initializing Development Workspace [×]"
# Update OS
# echo "Updating OSX. If this requires a restart, run the script again."
# # Install all available updates
# sudo softwareupdate -ia --verbose
# # Install only recommended available updates
# #sudo softwareupdate -ir --verbose
# Install Xcode Tools (Git)
echo "Installing Xcode Command Line Tools..."
# Install Xcode command line tools
xcode-select --install
# Check for Homebrew,
# Install if we don't have it
if test ! $(which brew); then
echo "Installing Homebrew..."
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# Make sure we’re using the latest Homebrew.
brew update
# Install Node & Global Packages
echo "Installing Node..."
brew install node
echo "Installing Yarn..."
brew install yarn
echo "Installing Gulp..."
npm install -g gulp-cli
echo "Installing Bower..."
npm install -g bower
# Install Linters
echo "Installing Linters..."
npm install -g stylelint
npm install -g eslint
npm install -g prettier
npm install -g -D stylelint-scss
npm install -g -D stylelint-order
npm install -g -D eslint-config-airbnb
npm install -g -D eslint-config-prettier
npm install -g -D eslint-config-airbnb-base
npm install -g -D eslint-plugin-prettier
npm install -g -D eslint-plugin-import
npm install -g -D eslint-plugin-jsx-a11y
npm install -g -D eslint-plugin-react
# Set OS Defaults
echo "Setting OS Defaults..."
# Finder: show hidden files by default
defaults write com.apple.finder AppleShowAllFiles -bool true
# Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true
# Disable smart quotes as they’re annoying when typing code
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false
# Disable press-and-hold for keys in favor of key repeat
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
# Set a blazingly fast keyboard repeat rate
defaults write NSGlobalDomain KeyRepeat -int 1
defaults write NSGlobalDomain InitialKeyRepeat -int 15
# Avoid creating .DS_Store files on network volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
# Install Desktop Applications
echo "Installing iTerm..."
brew cask install iterm2
echo "Installing Google Chrome..."
brew cask install google-chrome
echo "Installing Slack..."
brew cask install slack
echo "Installing Zeplin..."
brew cask install zeplin
read -p "Would you like to download Sublime Text? (y/n) " -n 1;
echo "";
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo "Installing Sublime Text..."
brew cask install sublime-text
fi;
read -p "Would you like to download VSCode? (y/n) " -n 1;
echo "";
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo "Installing VSCode..."
brew cask install visual-studio-code
fi;
# Setup projects folder
echo "Creating 'Sites' Directory..."
cd ~
mkdir Sites
# Install Oh My Zsh
echo "Installing Oh My Zsh (Z shell)..."
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
echo "Development Workspace Ready [✔]"
echo ""
echo "Be sure to checkout the README for more details on this script"
echo ""
echo "Restart your computer to ensure all updates take effect"
echo "------------------------------"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment