Skip to content

Latest commit

 

History

History
61 lines (35 loc) · 3.43 KB

File metadata and controls

61 lines (35 loc) · 3.43 KB

Off-site Development Guide

NOTE: Don't follow this guide yet, unless you've been instructed to do so. This document is still in development.

Environment Setup

To set up your computer, open a Terminal window and run the following command:

bash -c "$(curl -s https://raw.githubusercontent.com/ysdn-2016/ysdn-2016.github.io/develop/bin/bootstrap)"

Errors? Post in #off-site-backend and someone can help you out.

Install Github for Mac

Git is a tool to make it easier to work on code in a collaborative way. Normally git is a command-line tool, but Github makes Github for Mac so you don't need to use the command line. Download it here.

Never used git before? Github has some guides for getting started, and for contributing code. And if you have questions, ask in the Slack. A bunch of people have experience with git and will be able to help you out.

Clone the site

The site is contained in the ysdn-2016/ysdn-2016.github.io repo. Head there and clone the repo via the command line, or, if you're using Github for Mac, hit the "Clone in Desktop" button in the sidebar.

Writing code

Open up your cloned repo in your favourite text editor.

To start the web server, change into the cloned repo folder

make watch

This will start the local server at http://localhost:8080, and will automatically rebuild the site when changes are made.

Writing code

Front-end

TODO: Add some guides for writing css and js.

Committing code

The way we're working is based on this workflow.

  1. Create a new branch for the task you're working on. The name you give it should be based on the issue number and name. For example, the appropriate branch name for #19 would be 19-connect-api-to-database
  2. Make your changes. Be sure to commit as you go, and try not to lump all your changes into one big commit. If you're coding a gallery page, maybe commit once you have the basic HTML structure done, then the CSS, and then each subsequent refinement.
  3. Once you're happy with the changes, push the branch to Github and open a Pull Request. In the pull request text, link to the related issue, and tag a few people to review your code. For a good example, check out this PR. The PR will automatically create a review server to make it easier to check out your work. Send it to a few people if you'd like to share.

A few other nits:

  • When writing a commit message, use present tense, not past tense. Write "Fix sidebar position bug" rather than "Fixed sidebar position bug."

Deploying

Deployments are still being figured out. For now, when you'd like to push code to the live site, just ping Ross on Slack.