2022-06-19 01:45:41 -04:00
# README
2021-08-30 00:50:30 -04:00
2022-06-19 01:45:41 -04:00
## Documentation
- [Architecture and Folder Structure ](docs/architecture.md )
- [Everything about pages ](docs/pages.md )
## Development
### Dependencies
2021-08-30 00:50:30 -04:00
Make sure that you have `node` >= 14 and `npm` >= 7. Node 14 ships with npm v6,
so if you're using node 14, you would need to upgrade npm. Alternatively you
could also upgrade to node 16, which ships with npm 7.
How to upgrade npm: `npm i -g npm`
2022-06-19 01:45:41 -04:00
### Local
2021-08-30 00:50:30 -04:00
- `npm install` to install project dependencies
2022-06-19 01:45:41 -04:00
- `npm run build:images` to optimize images for the first time after cloning
2021-08-30 00:50:30 -04:00
- `npm run dev` to run the dev server (http://localhost:3000)
2022-06-19 01:45:41 -04:00
### Production
2021-08-30 00:50:30 -04:00
- `npm install` to install project dependencies
- `npm run build` to generate html/css/js
- `npm run export` to move the built files (along with assets in the public directory) to the `/out` directory
2021-09-03 18:34:56 -04:00
- Use your favourite web server to host the files in the `/out` directory. (A very simple one would be `python -m http.server` - not sure if it should actually be used for production :P)
2022-06-19 01:45:41 -04:00
## Deploy
2021-09-03 18:34:56 -04:00
- `groups` (make sure you're in the `www` group)
- `curl -o- https://git.csclub.uwaterloo.ca/www/www-new/raw/branch/main/deploy.sh | bash` (run on `caffeine` )