Last Week

  1. We got setup in CodeSandbox
  2. We found the “Hello World” posts in our class-notes repos…

This Week

  1. Let’s edit the “Hello World” post
  2. Let’s push our edits to Github
  3. Let’s get a solid workflow going. This is amazing.

Edit the Hello World Post

First things first, search for “Hello World” in Code Sandbox. Code Sandbox’s search tab will return all results in your code where the string “Hello World” appears. IMO that’s the fastest way to find pieces that you want to change & anytime I see something on my website that I don’t like… I search for it.

1.0 Find your previously imported Sandbox

You can find your previously imported Repo here: https://codesandbox.io/dashboard/repositories.

You should have a repo like yourGithubName/class-notes-2 or yourGithubName/class-notes like mine below: sandbox-repos

If you don’t have a repo import it by clicking the import repository button.

2.0 Search for Hello World

The search icon (it’s on the top left) search-icon

Search Results… These results show there is (1) file named index.md that includes the string “Hello World” on (2) lines. search-results

3.0 Edit the Hello World file

If you click one of the lines the index.md file will open, BUT IT’s NOT EDITABLE… annoying

You can make it editable by clicking on this weird little icon at the top right of the file <> edit-markdown-icon

Now it’s editable editable-markdown

Edit the text from “Hello World” to “My Name is Whatever” my-name-is-whatever

4.0 Run your website

Open a terminal open-a-terminal

Do you remember how to start your server? npm-run-start

Oh no the directory error again directory-error

Fix it by changing into the correct directory

# remember you can start typing class & press tab to autocomplete it
cd class-notes

Then try npm run start again npm-run-start-error-2

Ahhh! npm install (you shouldn’t always have to npm install when you start a new CodeSandbox … maybe this is a nuance of CodeSandbox or something we’re doing wrong)

You’ll know npm install is working when you see this npm-install-working

It’ll take a while… Here’s a comic: compiling

It’s done when you see this, so then npm run start again npm-run-start-again

When npm run start is done you can open the website preview in the top of Code Sandbox’s UI open-preview

Open the preview in full screen by clicking the little double window icon full-screen-preview

5.0 Edit -> Preview Workflow

So now we can see a preview of our website… anytime we make an edit this preview should AUTOMATICALLY update… so go make a bunch of edits edit-preview-workflow

6.0 And push your edits to github

Click this little icon on the top left git-icon

Then click commit and push

Then click open pull request open-pull-request

Then create the pull request in github create-pull-request-github

7.0 Temperature Check

  • We should talk about everything we just did.
  • This is AMAZING progress.