Skip to content

Workflow: Terminal, Shell, Node, VSCode

Daniel Shiffman edited this page Oct 30, 2023 · 11 revisions

πŸš‚ Outline

πŸš€ Introduction

πŸ’» Terminal Basics

  • 🍎 Mac Users: Use terminal found under Applications > Utilities or download iTerm.
  • πŸͺŸ Windows Users: You can use the Command Prompt or PowerShell.
  • Read about Unix on Wikipedia
  • Unix Commands Covered
    • echo: Print text to the terminal.
    • cd: Change directory.
    • pwd: Print working directory. (πŸͺŸ just cd without arguments)
    • ls: List the contents of a directory. (πŸͺŸ dir)

🐚 Shell (ZSH) and Oh My Zsh

  • Z Shell
  • Oh My Zsh for more details and installation instructions.
  • curl
  • πŸͺŸ Windows Users: You can look into something like starship.rs for terminal customization.

πŸ“¦ Installing Node.js using NVM

You can install node.js through the node website or using NVM (Node Version Manager). For the tutorials, using Node version 18.18 is recommended.

source ~/.zshrc
  • NVM Commands covered
    • nvm install <version>: Install a specific version of Node.
    • nvm use <version>: Switch to a specific version of Node.
    • nvm list: List installed Node versions.
    • nvm alias default <version>: Set the default version of Node.
  • Confirm node.js version
node --version

πŸ“ Using a Code Editor: Visual Studio Code

Settings

{
  "editor.tabSize": 2,
  "editor.renderWhitespace": "all",
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.formatOnSave": true,
  "javascript.preferences.quoteStyle": "single",
  "prettier.singleQuote": true,
  "editor.fontSize": 24,
  "editor.wordWrapColumn": 120,
  "prettier.printWidth": 120,
  "diffEditor.hideUnchangedRegions.enabled": true
}

code command

Running a p5.js sketch