dev: Contains active approved development. Developer needs to create pull requests in order to add commits todev.master: Contains published website code. In the endmastershould be even withdev.gh-pages: Contains a complete build of the website. No development code in this branch. Ideally it should be generated frommasterbranch.- All other branches: Developer created branches. Most of the time they should be checkout from
dev.
-
clone this repo
-
cd ADA-Website -
git checkout dev -
make sure you have
npminstalled. If no, check out https://github.com/UT-Applicataion-Development-Association/Contribution-Guidelines#install-nodejs--npm -
npm install -
now run
npm start, you should be able to see the development website in around 10 seconds. -
open this folder with visual studio code
-
if you use WSL, make sure to use Remote - WSL plugin
-
install the following plugins:
- ESlint(code linter)
- Live Sass Compiler(compile Sass to CSS)
- Prettier(code formatter) (when you make a commit, make sure to format using prettier before commit)
-
click the Watch Sass button from bottom right side of vscode. This will generate css files for you. This is important!! If you don't do this then there would be no style.
-
When you create a new class name, make sure to start the class name with
opening,main,leftorright! Otherwise, there might be future collision risks.
create your own Sass module with underscore "_" at beginning of the filename, for example, "_HelloWorld.scss".
add @import <your filename> to Style.scss
click on Watch Sass(bottom right) compile your Sass code.
- Assume you are building from
masterbranch, first make sure your website can compile and run usingnpm start - Run
npm run build - After build is finished, you should see a
buildfolder in the directory. - Save/copy the build folder to somewhere else, we will use it later.
git checkout gh-pages- Delete everything in this branch, except the file
CNAME. - Copy everything from the build folder we generated into this branch's root folder.
- Push your changes onto
origin/gh-pages. - Wait for a while(1min to 30mins), github page should configure itself.
- Go to uoftada.com to see your changes.
Note: the website domain is managed with GoDaddy. For more info please contact the administrators.