Skip to content

Commit 3431c00

Browse files
committed
make it the readme
1 parent b29a7db commit 3431c00

File tree

3 files changed

+62
-44
lines changed

3 files changed

+62
-44
lines changed

observablehq.config.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ export default {
77
// all pages will be listed in alphabetical order. Listing pages explicitly
88
// lets you organize them into sections and have unlisted pages.
99
pages: [
10-
{
11-
name: "Lab 0: Getting Started",
12-
open: false,
10+
{
11+
name: "Lab 0: Getting Started",
12+
open: false,
1313
pages: [
14-
{ name: "Instructions", path: "/lab_0/instructions"},
15-
{ name: "Dashboard", path: "/lab_0/index"},
16-
]
17-
}
14+
{ name: "Instructions", path: "/lab_0/readme" },
15+
{ name: "Dashboard", path: "/lab_0/index" },
16+
],
17+
},
1818
],
1919

2020
// Content to add to the head of the page, e.g. for a favicon:

src/lab_0/index.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,29 @@ toc: true
55

66
This page is where you can iterate. Follow the lab instructions in the [readme.md](./README.md).
77

8-
8+
```js
9+
const count = view(
10+
Inputs.button("throw confetti!", () => {
11+
return count + 1;
12+
})
13+
);
14+
```
915

1016
```js
11-
const count = view(Inputs.button("throw confetti!", () => { return count + 1 }))
17+
// const names = view(
18+
view(Inputs.text());
19+
// );
20+
// console.log(names);
1221
```
1322

1423
You've thrown confetti ${count} times
1524

25+
<!-- <table>
26+
<th>
27+
<tr>
28+
<td>test</td></tr>
29+
</th>
30+
<tb>
31+
<tr></tr>
32+
</tb>
33+
</table> -->
Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
1-
21
# Lab 0: Getting Started
32

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:
911

10-
The assignment requirements are as follows:
1112
1. Replicate the local environment created in class on your own computer ([Installations](#installations))
1213
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
1718
4. Submit your [deployed link](#4-set-up-your-github-pages-for-your-deployment) as a comment on the lab 0 commons post.
1819

19-
Bonus:
20+
Bonus:
21+
2022
- Try adding an image
2123

2224
---
@@ -25,17 +27,17 @@ Bonus:
2527

2628
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.
2729

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).
2931

3032
- [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.
3234
- [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.
3739
- [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.
3941

4042
# Github Setup
4143

@@ -51,7 +53,7 @@ This creates a clone of our class repository in your own github account. After t
5153

5254
<img src='assets/forked.png'>
5355

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.
5557

5658
## 2. On GitHub, navigate to **your fork** of the repository, clone it to your local computer, and install dependencies.
5759

@@ -104,31 +106,31 @@ $ git remote -v
104106

105107
## 4. Set up your Github Pages for your deployment
106108

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.
108110

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").
110112

111113
<img src='assets/pages.png'>
112114

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]/`.
114116

115117
You can see all the deployments triggered from pushed in the deployments section of your repository page.
116118

117119
<img src='assets/deployments.png'>
118120

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.
120122

121123
## 5. Install dependencies and begin local development
122124

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.
124126

125127
To install and get started, run the following in your terminal:
126128

127129
```sh
128130
# within the repository directory, install the packages
129131
$ npm install
130132

131-
# attempt to enter development
133+
# attempt to enter development
132134
$ npm run dev
133135

134136
> dev
@@ -169,22 +171,21 @@ $ git push
169171

170172
### Working with your terminal
171173

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".
173175

174176
![Mac Terminal](assets/mac_terminal.png)
175177
![Command Prompt](assets/pc_command_prompt.png)
176178

179+
More resources to understand these interfaces:
177180

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)
180-
* PC: [cmd.exe Wiki](https://en.wikipedia.org/wiki/Cmd.exe)
181-
* PC: [Command Prompt Basics (youtube tutorial)](https://www.youtube.com/watch?v=QBWX_4ho8D4)
182-
* [Complete List: Command Line Prompt (CMD)](https://www.codecademy.com/article/command-line-commands)
183-
181+
- Mac: [What is terminal on mac?](https://support.apple.com/guide/terminal/what-is-terminal-trmld4c92d55/mac)
182+
- PC: [cmd.exe Wiki](https://en.wikipedia.org/wiki/Cmd.exe)
183+
- PC: [Command Prompt Basics (youtube tutorial)](https://www.youtube.com/watch?v=QBWX_4ho8D4)
184+
- [Complete List: Command Line Prompt (CMD)](https://www.codecademy.com/article/command-line-commands)
184185

185186
### Keeping your repository synced
186187

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.
188189

189190
```sh
190191
# pulls the upstream changes and stores them in `upstream/main`
@@ -224,4 +225,3 @@ $ git merge upstream/main
224225
- `rm [filename]`: Delete file (rm -r [folder] for folders)
225226
- `cp [source] [destination]`: Copy files
226227
- `mv [source] [destination]`: Move/rename files
227-

0 commit comments

Comments
 (0)