This is the frontend of the Illinois Track Club website.
grunt serve
grunt test
grunt build
-
Don't push to master
-
DON'T PUSH TO MASTER
-
Always create a new branch for a new task. Dev on this branch, create a PR, and merge in from that PR.
-
Always create a pull request and undergo code review
-
DON'T PUSH TO MASTER
-
npm (Included with Node.js)
-
bower (Run
npm install bower -g
after installing Node.js/npm)
-
Install Node.js, bower, and npm
-
Ensure that you can run
node
,bower
, andnpm
commands from the command line -
gem update --system && gem install compass
after installing Ruby -
Clone the repo
-
Run
npm install && bower install
at the root directory of the repo -
Run
grunt serve
to load the site into browser. Livereload is enabled, so any changes will automatically reload in the browser. Once you can run the site locally, you should be good to go.
-
Make sure you are up to date with current site (
git pull
) -
git checkout -b new-branch-name
-
Make your changes, using
grunt serve
to watch your changes. Ensure that they work with the backend if updating the news or results page (Run the backend server locally. Frontend automatically will point to it). -
Run
grunt test
to confirm you did not break anything -
Run
grunt build
AFTER YOU HAVE CONFIRMED NOTHING IS BROKEN. This builds the site for production in thedist
folder. -
Run
git status
to ensure thedist
site was built and only the changes you made are included. -
Run
git add .
orgit add path/to/file
to include files in the git commit. -
Run
git commit -m "meaningful message"
to create your commit. Make sure you are commiting to the branch you created. You can check before by runninggit branch
. -
Push the branch to GitHub with:
git push origin new-branch-name
. The branch should now be available on the GitHub website. -
Go to the repo on GitHub and create a pull request for the branch. Confirm the changes are as expected on the website. After all of the tests have passed, merge the branch and delete the branch on GitHub. IF THE TESTS DON'T PASS, GO BACK TO STEP 3 AND FIX YOUR MISTAKES.
-
Back in the local terminal, run
git checkout master
andgit pull origin master
-
After that branch is up to date, run
git branch -d new-branch-name
to remove the local version of the branch you just merged.git branch
should now only show the master branch and any other branches you may have. Always delete old/stale branches to avoid confusion. -
Run
git subtree push --prefix dist origin gh-pages
to push the changes to the live site. -
Confirm everything works on the live site. It usually takes 5 minutes or less for the new code to appear on the live site.