The website for HackTJ 8.0.
yarn install
We use React.
git clone [email protected]:HackTJ/2021.git 2022 && cd 2022/
yarn install
git reset "$(git commit-tree HEAD^"{tree}" -m "Push HackTJ 8.0 website" -m "$(yarn run git-history-coauthors)")" # squash all commits into 1
git remote set-url origin [email protected]:HackTJ/2022.git
git pushyarn upgrade-interactiveyarn dedupeyarn run lintyarn run testyarn run switch event: switch to the event repository (configures the project so that builds are for/2021)yarn run switch homepage: switch to the homepage repository (configures the project so that builds are for/)yarn run start: starts a development server on port 3000 and watches files for changes, compiling them on the flyyarn run build: compiles all files to thebuild/directory but doesn't watch for changes or start a serveryarn serve build/: starts a static server using the files inbuild/yarn run deploy event: pushes to thegh-pagesbranch of this repository and deploys the site to https://hacktj.org/2021yarn run deploy homepage: pushes to the hacktj.github.io repo and deploys the site to https://hacktj.orgyarn run deploy all: shortcut for bothyarn run deploy eventandyarn run deploy homepage
In the case that one of the endpoints (/2021 or /) doesn't work but the other does, immediately set up a hardcoded redirect in the nonfunctional repository to redirect to the correct site.
To test a production build locally:
yarn run switch homepageyarn run buildyarn serve build
To deploy a change:
yarn run start- make your changes; when you're done, close the development server
yarn run lintgit add . && git commityarn run deploy event; make sure the deployed site looks goodyarn run deploy homepage; make sure the deployed site looks goodgit push
- create a new repository under the HackTJ organization for each event
- the
deploy eventscript doesn't commit the source code to the repository's main branch, it only commits the built website- you should commit the source code to the
mainbranch each time you deploy- before you commit to
main, always make sure you runyarn run switch event- if you need to, create a pre-commit hook to automatically do this
- before you commit to
- you should commit the source code to the
- don't run
git pullafteryarn run switch homepage- only pull when you're set up for the event repository