Files, Directories and the Command Line
Housekeeping
- Git Poll
- “Remember me on this device”
- Aside: Password management
- Tony recommends using a password manager. He uses LastPass.
Homework
- Review
- Files and Directories
- Command Line
- VS Code
- Reference: Getting Started with VS Code
CPNT 201 is all about the tools that we use to support our (soon to be) coding addiction. It’s a course that is spread out over the program in four parts:
- Starting Today: Git and Github (mostly tomorrow)
- Feb 3: Raster Image software (i.e. Photoshop, in the before times)
- Feb 8: Vector Image software (i.e. Illustrator, in the before times)
- Mar 2: Build Tools (Sass, minification)
Today we’ll be covering the core skills we’ll need to use Git and GH effectively: File management and core command line skills.
Pre-requisites
- Git installed
- GitHub account created
- VS Code installed
1. Optional: Download Sample SAIT Directory structure
- Find this Remote Repo on GH Pages: https://github.com/sait-wbdv/sait-sample
- Download a ZIP of this directory under the green
Code
menu. - Extract the archive and rename/move the directory to a convenient location on your machine.
- There are README files in each sub directory to show you how to use them.
Relevant Cheatsheets
2. VS Code initial setup
- Set your indent preferences
- Open VS Code Preferences
- Set your
Tab Size
to2
- Install the Live Server Extensions
- Navigate to the Extensions tab on the left side bar.
- Search for “Live Server”.
- Install the Extension named “Live Server” (currently at version 5.6.1).
- Note: in order for this extension to work, you need to open a directory, not an individual file.
3. Terminal demo
Relevant Cheatsheets
Activity: Follow the white rabbit
If you’ve downloaded the default directory above:
-
Open the following file in VS Code:
/in-class/W1R/white-rabbit.md
-
Follow the instructions in this file.
If not:
- Open your unix terminal;
- Using
pwd
,ls
andcd
navigate to a directory you often use on your file system (i.e. your Downloads folder). - List the contents of this directory.
4. Cloning your first repo(s)
If you’ve downloaded the default directory above:
-
Open the following file in VS Code:
/_materials/README.md
- Follow the instructions for cloning the read-only repos for this program.
-
In
sample-code
, open a directory that contains anindex.html
file such as:/_materials/sample-code/frontend/calculator/finished
- View this file in your browser using the Live Server extension (there should be a “Go Live” button in the footer of VS Code).
- Try some other directories with an
index.html
file!
Lab Time
Using your new assignments
directory, work on DSGN 270 Assignment 1 and store your markdown file in /assignments/dsgn270-a1
.