You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/lab_0/readme.md
+35-35Lines changed: 35 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,24 @@
1
-
2
1
# Lab 0: Getting Started
3
2
4
-
The goals for this tutorial are:
5
-
* to set up installations for your local development environment
6
-
* to learn how to serve your pages so that you can see/interact with them while you are coding
7
-
* to get comfortable with the Github workflow
8
-
* to set up a public site to showcase your work
3
+
The goals for this tutorial are:
4
+
5
+
- to set up installations for your local development environment
6
+
- to learn how to serve your pages so that you can see/interact with them while you are coding
7
+
- to get comfortable with the Github workflow
8
+
- to set up a public site to showcase your work
9
+
10
+
The assignment requirements are as follows:
9
11
10
-
The assignment requirements are as follows:
11
12
1. Replicate the local environment created in class on your own computer ([Installations](#installations))
12
13
2. Fork this repository, set up github pages, and initialize your upstream repository ([Github Setup](#github-setup))
13
-
3. Edit the `index.md` file to include:
14
-
1. Markdown: A page header (`#`), some smaller header (`##` or `###`), and some text content (about anything!)
15
-
2. HTML: A table, an image, and a link
16
-
3. JS: a button that increments some value which is displayed in the client.
14
+
3. Edit the `index.md` file to include:
15
+
1. Markdown: A page header (`#`), some smaller header (`##` or `###`), and some text content
16
+
2. HTML: A table, a list, and an image
17
+
3. JS: an input that adds
17
18
4. Submit your [deployed link](#4-set-up-your-github-pages-for-your-deployment) as a comment on the lab 0 commons post.
18
19
19
-
Bonus:
20
+
Bonus:
21
+
20
22
- Try adding an image
21
23
22
24
---
@@ -25,17 +27,17 @@ Bonus:
25
27
26
28
The first step is to install all the appropriate software to get our environment together. Please install the following on the computer you intend to complete all the tutorials from.
27
29
28
-
*Note*: while VS code is an application, the other softwares are installed via your terminal or bash. If this is your first time working with your terminal, check out [working with your terminal](#working-with-your-terminal).
30
+
_Note_: while VS code is an application, the other softwares are installed via your terminal or bash. If this is your first time working with your terminal, check out [working with your terminal](#working-with-your-terminal).
29
31
30
32
-[VS Code](https://code.visualstudio.com/) - free code editor and IDE (our recommendation). This is an application to view files and code. This application also includes many handy extensions that can help us with [version control](https://code.visualstudio.com/docs/editor/versioncontrol#_git-support).
31
-
- You may also use another code editor that has AI integration, like [cursor](https://cursor.com/), but these ai integrations typically require payment after reacting an interaction limit.
33
+
- You may also use another code editor that has AI integration, like [cursor](https://cursor.com/), but these ai integrations typically require payment after reacting an interaction limit.
32
34
-[Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) version control software. You will also need an account on [Github.com](https://github.com/).
33
-
- if you have a mac, and you have installed Xcode, you _already have git_. You can test this by opening your terminal and running `git --version`.
34
-
- if you are using a PC, an application called "git bash" will be part of the default git install. You may prefere to use this application rather than the "command prompt" for git commands.
35
-
- all installation details are included in the [Getting Started Installing Git link](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).
36
-
- an alternative for both mac and pc is to use the [source control](https://code.visualstudio.com/docs/editor/versioncontrol#_git-support) options that come with the default VS Code installation. This is often easier than opening terminal each time and offers many of the same actions.
35
+
- if you have a mac, and you have installed Xcode, you _already have git_. You can test this by opening your terminal and running `git --version`.
36
+
- if you are using a PC, an application called "git bash" will be part of the default git install. You may prefere to use this application rather than the "command prompt" for git commands.
37
+
- all installation details are included in the [Getting Started Installing Git link](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).
38
+
- an alternative for both mac and pc is to use the [source control](https://code.visualstudio.com/docs/editor/versioncontrol#_git-support) options that come with the default VS Code installation. This is often easier than opening terminal each time and offers many of the same actions.
37
39
-[Node](https://nodejs.org/en/download/) - javascript development software. You can check if the install was succesful by running `node -v` in your command line or terminal. It should return your version number.
38
-
- Node installation includes node package manager (npm), which we will leverage to install Observable Framework and its dependencies.
40
+
- Node installation includes node package manager (npm), which we will leverage to install Observable Framework and its dependencies.
39
41
40
42
# Github Setup
41
43
@@ -51,7 +53,7 @@ This creates a clone of our class repository in your own github account. After t
51
53
52
54
<imgsrc='assets/forked.png'>
53
55
54
-
This repository is _your_ personal copy of the existing repository. This will be where you do all your lab work, and will include the deployed links that you will submit when turning in your assignments.
56
+
This repository is _your_ personal copy of the existing repository. This will be where you do all your lab work, and will include the deployed links that you will submit when turning in your assignments.
55
57
56
58
## 2. On GitHub, navigate to **your fork** of the repository, clone it to your local computer, and install dependencies.
57
59
@@ -104,31 +106,31 @@ $ git remote -v
104
106
105
107
## 4. Set up your Github Pages for your deployment
106
108
107
-
We use [Github Pages](https://docs.github.com/en/pages/getting-started-with-github-pages/what-is-github-pages) to serve our websites publicly. Github Pages is static site hosting service that takes HTML, CSS, and JavaScript files straight from a repository on GitHub, optionally runs the files through a build process, and publishes a website.
109
+
We use [Github Pages](https://docs.github.com/en/pages/getting-started-with-github-pages/what-is-github-pages) to serve our websites publicly. Github Pages is static site hosting service that takes HTML, CSS, and JavaScript files straight from a repository on GitHub, optionally runs the files through a build process, and publishes a website.
108
110
109
-
To [set up your github pages site](https://docs.github.com/en/pages/getting-started-with-github-pages/creating-a-github-pages-site#creating-your-site), you can go to your repository's `Settings` tab and then scroll down to `Pages` section. Select `Github Actions` as source ("Deploy from a branch").
111
+
To [set up your github pages site](https://docs.github.com/en/pages/getting-started-with-github-pages/creating-a-github-pages-site#creating-your-site), you can go to your repository's `Settings` tab and then scroll down to `Pages` section. Select `Github Actions` as source ("Deploy from a branch").
110
112
111
113
<imgsrc='assets/pages.png'>
112
114
113
-
The workflow code is already included in the main class repository. When you push your changes up to github, then your site will automatically be redeployed and be avallable at `https://[YOUR_USERNAME].github.io/[YOUR_REPOSITORY_NAME]/`.
115
+
The workflow code is already included in the main class repository. When you push your changes up to github, then your site will automatically be redeployed and be avallable at `https://[YOUR_USERNAME].github.io/[YOUR_REPOSITORY_NAME]/`.
114
116
115
117
You can see all the deployments triggered from pushed in the deployments section of your repository page.
116
118
117
119
<imgsrc='assets/deployments.png'>
118
120
119
-
*NOTE*: You must navidate in the URL to a folder with an index.html, or else you will get a 404. This will take a few minutes to update with any pushed changes.
121
+
_NOTE_: You must navidate in the URL to a folder with an index.html, or else you will get a 404. This will take a few minutes to update with any pushed changes.
120
122
121
123
## 5. Install dependencies and begin local development
122
124
123
-
The cloned repository already has packages and dependencies set up to get started with Observable Framework. The `package.json` file includes the details of the packages required to begin development.
125
+
The cloned repository already has packages and dependencies set up to get started with Observable Framework. The `package.json` file includes the details of the packages required to begin development.
124
126
125
127
To install and get started, run the following in your terminal:
126
128
127
129
```sh
128
130
# within the repository directory, install the packages
129
131
$ npm install
130
132
131
-
# attempt to enter development
133
+
# attempt to enter development
132
134
$ npm run dev
133
135
134
136
> dev
@@ -169,22 +171,21 @@ $ git push
169
171
170
172
### Working with your terminal
171
173
172
-
Your computer, mac or pc, includes a command line interface that lets you communicate with your operating system. For macs, that app is called "terminal", and on windows machines, its the "command prompt".
174
+
Your computer, mac or pc, includes a command line interface that lets you communicate with your operating system. For macs, that app is called "terminal", and on windows machines, its the "command prompt".
173
175
174
176

175
177

176
178
179
+
More resources to understand these interfaces:
177
180
178
-
More resources to understand these interfaces:
179
-
* Mac: [What is terminal on mac?](https://support.apple.com/guide/terminal/what-is-terminal-trmld4c92d55/mac)
-[Complete List: Command Line Prompt (CMD)](https://www.codecademy.com/article/command-line-commands)
184
185
185
186
### Keeping your repository synced
186
187
187
-
As the semester progresses, updates may be pushed to the class repository. The following terminal commands can keep your repo [synced](https://help.github.com/en/github/getting-started-with-github/fork-a-repo#keep-your-fork-synced). Make sure to do this before working on new code to ensure that you are working off of the latest updates.
188
+
As the semester progresses, updates may be pushed to the class repository. The following terminal commands can keep your repo [synced](https://help.github.com/en/github/getting-started-with-github/fork-a-repo#keep-your-fork-synced). Make sure to do this before working on new code to ensure that you are working off of the latest updates.
188
189
189
190
```sh
190
191
# pulls the upstream changes and stores them in `upstream/main`
@@ -224,4 +225,3 @@ $ git merge upstream/main
224
225
-`rm [filename]`: Delete file (rm -r [folder] for folders)
0 commit comments