Austin Coding Academy
JavaScript Workbook
Claiming your workbook
- Click the 'Fork' button (choose your account if prompted).
- Copy HTTPS URL from your forked repository
- In your terminal (or in git bash, for Windows people), navigate (using
cd
) into a directory where you want to start keeping your repositories. - Clone your new repository by typing
git clone <forked clone URL>
(the HTTPS URL you copied above) - Now go into the new directory by using
cd javascript-workbook
- Add the base repository as an upstream
git remote add upstream https://github.com/AustinCodingAcademy/javascript-workbook.git
- Check the configuration of your remotes with
git remote -v
, it should look very similar to this (except it'll be YOUR username)
$ git remote -v
origin git@github.com:username/javascript-workbook.git (fetch)
origin git@github.com:username/javascript-workbook.git (push)
upstream git@github.com:AustinCodingAcademy/javascript-workbook.git (fetch)
upstream git@github.com:AustinCodingAcademy/javascript-workbook.git (push)
Push to Github and create a PR
-
From your project directory, run
npm install
to tell NPM to install all the node modules we use in this class -
Use Atom (or another editor) to make the change to the
index.html
file in the top level directory. ChangeHello World!
toHello <your name>!
-
When you're finished, stage your file, commit your changes, and push to GitHub using the following commands:
git status git add . git commit -m "Initial Commit" git push origin gh-pages
-
Now go to your forked repository on GitHub (at https://github.com/your-username/javascript-workbook). A little yellow box should have popped up asking you to make a Pull Request. Click to review.
-
Click "Create Pull Request"
-
Every time you make a change and push to GitHub, this PR will automatically update. No need to do it more than once.
Get latest workbook updates
-
To get the latest code/homework/test updates, be sure to have a "clean working directory" by committing or removing all of your changes. You check for a "clean working environment" by running
git status
and making sure no files show up. -
Run
git pull upstream gh-pages
Running the apps
Simply run node path/to/file.js
example node 01week/rockPaperScissors.js
Running Tests
Tests are a great way to make sure you code works the way you planned it would, and to make sure you don't break something in the future. We will be using them to test our understanding of the lesson. It's also our main way to assign grades for an assignment.
To run a the tests on a file run npm test path/to/file.js
, etc.
Running the Linter
Simply run npm run lint
Running the Server
- Run
npm start
- To break out of the server, press
ctrl
+c