See if you are ready to push your code for me to review. In particular:
- Make sure you have created and properly name a folder for each of our major projects
- Make sure each project passes grunt check
“Where there’s smoke there’s fire.” A smoke test is designed to check not that a program runs perfectly, but that it at least meets a set of minimum requirements. For instance, in our case, our smoke test ensures that each project has a valid directory name and passes grunt check. Just because it passes these minimal tests does not mean the program works correctly. But it shows that our projects are at least worthy of being looked at.
Grunt Clean Script
Here is a bash script that will check for the existence of folders that I expect to find. If they do exist, then grunt check is run inside it:
Save this file as SmokeTest in the root of your repository. Make sure it has executable permissions:
chmod +x SmokeTest
You only have set the permissions one time.
Run the script:
The first few lines of output should look something like this:
Turn it in
When you are done, simply submit your assignment and leave a brief message reporting on your status. For instance: “All done. Everything passes.”
After I pull your latest code, I’ll run the script in your repository to check that all is good.
NOTE: The script uses the bash command set -e to ensure that the script exits if an error occurs. If you turn this assignment in on time and the script runs all the way through to the end without error the first time I run it, then you get a 100, else you get a 5 and have to fix the error and resubmit the assignment.
This assignment is really easy to complete if you have been doing your work correctly all along. As a result, you should make sure it passes even if you have not yet completed a particular assignment. This means at minimum you need properly named project directory that contains a valid package.json, Gruntfile.js and anything else necessary to get the smoke test to pass. If the project itself does not work correctly, or does not even exist in any more than nascent form, then you can still get a 100 on this assignment. The key is to be sure all the folders exist and grunt check passes in each one.
Rename a folder
If a folder is named incorrectly, you can change the name with the git mv command:
git mv check Week01-BasicTypeExpress/ Week02-BasicTypesExpress
Then push your work and I will be able to see the new name for your folder.
NOTE: I care that your folders are named correctly because I use scripts to help me grade your homework. These scripts won’t work correctly if your folders are not named correctly.
If there are files you don’t want to check, such as three.js, then exclude it in .jscsrc
"excludeFiles": ["**/node_modules/**", "**/components/**", "**/bower_components/**", "**/three.js", "**/pointer-lock-controls.js"],
Also, exclude files from JsHint by editing Gruntfile.js:
ignores: [ '**/node_modules/**', '**/components/**', '**/three.js', '**/pointer-lock-controls.js' ],
How I Grade
I do this:
git log --pretty=format:"%H %ad"
I look for the commit you did on the data you turned this in and create a branch on it:
git branch charliesmoke 94c2f4b68888
I check it out:
git checkout charliesmoke
Then I run SmokeTest