The website for HackTJ 8.0.
yarn install
We use React.
git clone git@github.com: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 git@github.com:HackTJ/2022.git
git push
yarn upgrade-interactive
yarn dedupe
yarn run lint
yarn run test
yarn 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 the build/
directory but doesn't watch for changes or start a serveryarn serve build/
: starts a static server using the files in build/
yarn run deploy event
: pushes to the gh-pages
branch 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 both yarn run deploy event
and yarn 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 homepage
yarn run build
yarn serve build
To deploy a change:
yarn run start
yarn run lint
git add . && git commit
yarn run deploy event
; make sure the deployed site looks goodyarn run deploy homepage
; make sure the deployed site looks goodgit push
deploy event
script doesn't commit the source code to the repository's main branch, it only commits the built website
main
branch each time you deploymain
, always make sure you run yarn run switch event
git pull
after yarn run switch homepage