HackTJ 7.0

The website for HackTJ 7.0, held on March 21st-22nd, 2020.

Setup

  • npm install

Development

We use ReactJS.

What to Change

Deployment

  • npm run start: starts a server on port 3000 and watches files for changes, compiling them on the fly
  • npm run build: compiles all files to the build/ directory but doesn't watch for changes or start a server
  • npm run deploy-event: pushes to the gh-pages branch of this repository and deploys the site to hacktj.org/202x
  • npm run deploy-homepage: pushes to the hacktj.github.io repo and deploys the site to https://hacktj.org
  • npm run deploy-all: shortcut for both npm run deploy-event and npm run deploy-homepage

In the case that one of the endpoints (/2020 or /) doesn't work but the other does, immediately set up a hardcoded redirect in the nonfunctional repository to redirect to the correct site.

Notes for next year

  • click "Use this template" (next to the clone or download dropdown) and name the new repository 2021, under the HackTJ organization—that way it will be displayed on our website at https://hacktj.org/2021 while leaving the old website up at https://hacktj.org/2020
  • all of the deploy commands involve running the switch script in this repository
    • if you notice that this script deletes the content of either public/index.html or src/App.js, immediately quit the deploy script and restore the contents with git and retry the npm script until it works
  • the deploy-event script doesn't commit the source code to the repository's master branch, it only commits the built code
    • you should commit the source code to the master branch each time you deploy
      • before you commit to master, always make sure you run npm run switch-event
  • don't run git pull after npm run switch-homepage
    • only pull when you're set up for the event repository