Structure
Folder Structure
src- Containsapp- Where the code is storedclasses- Custom classesmodules- Custom modules that each hold componentspages- Pages on the siteservices- Services used by the sitesettings- Website specific settingsutils- Utility code
assets- Where images, articles, and other fixed assets are storedblog-page-articles- Stores articles by yearicons- Stores COGS logo iconsimages- Stores imagesjs- Stores JavaScriptpictures-page-images- Stores pictures page images by year and semester
_server_.ts- The entry point of the website. It reads the command line arguments or environment variables to start a server in development or production mode.
dist- Where the release version of the website is stored once you build it.angular.json- Configuration for Angulartsconfig.json- Configuration for TypeScriptupdate_articles.py- Used to add new articles to the blog page. See Writing Blog Articles.update_images.py- Used to add new images to the pictures page. See Uploading Pictures.
NodeJS Scripts
ng- Runs the built website from thedistfolder.start- Starts a development server to serve the website locally.build- Builds the website.watch- Builds the website, and the watches for any file changes. If any files are changed the website is rebuilt.test- Runs unit tests.generate- Assuming you are developing under therucogs-infrastructuremono-repo, this copies the generated code from the backend submodule's folder.selfhosted- Scripts used for hosting the website on a server underneath therucogs/frontendpath.selfhosted:build- Builds the site with a base-href ofrucogs/frontend.selfhosted:copybuild- Copies the built files to the/var/www/rucogs.selfhosted:launch- Runesselfhosted:buildthenselfhosted:copybuild.
pretty- Run the prettier formatter on the TypeScript files withinsrc.
Note
To run a NodeJS script you have to run the follow code inside the repository's directory.
> npm run script_name