Today's challenge is to work as a team, divide the work, share a repo and get a working prototype up by the end of class.
- First build this project in the terminal
- Then attach it to the DOM
- Work through the challenge together
- As always whiteboard it and make a code plan
- Translate from English to pseudo code then to JavaScript
- Write tests and test with
npm test main.js
- Convert the pseudo code to real JavaScript Code
- Use
node main.js
to run the game - Once the terminal app works, build a GUI for your
- Present to class
- Turn in the URL to your repo and to your github.io, once for each person in your group
-
From your project directory, run
npm i
to tell NPM to install all the node modules we use in this class (seepackage.json
) -
Use your textEditor (VS Code) to change your files.
-
When you're finished
git status
, stage your filegit add .
, commit your changesgit commit -m "functions working"
, and push to GitHubgit push
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.
Simply run node path/to/file.js
example node 01week/rockPaperScissors.js
Tests are a great way to make sure your 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 the tests on a file run npm test path/to/file.js
, etc.
Simply run npm run lint
- Run
npm start
- To break out of the server, press
ctrl
+c