If you are working on an existing issue, please claim it with your comment, so there is no duplicate work.
- Ensure NodeJS version 18.12.1 LTS or later is installed on your system.
- Install VSCode v1.74 or later
- Clone the repository using git cli or ui like github desktop/sourcetree/gitkraken etc...
- Open the cloned folder using VSCode and install recommended extensions
- Run
npm run i
in the folder that you've just cloned to ensure you have all dependencies that are needed for development. - Run
npm run start
to start the dev server for the app
Hidden Files in VSCode
Some files are hidden in vscode by default, see the files.exclude
option in the settings file
There is a recommended extension adrianwilczynski.toggle-hidden
that allows to easily toggle hidden files on and off
You can reference any of the existing components in the storybook instance
- Run storybook via
npm run storybook
command - You can then browse the list of components and use the docs to help you use them
- This project uses Angular
- All source code is in the src folder, most of other files/folders in the top level of the repo are just various configs for different tools (linting, formatting, testing etc...)
- The MAIN CODE is in the app folder.
- Most of the time any of the internal folders like components will be the place to edit and create new code
- Here the app.component.ts is the main entry point for the angular app along with the other app.xxx.ts.
- The assets folder contains images/icons.
- The styles folder contains css stylesheets.
- The rest of the src folder contains the main index.html which is where all the angular code gets generated to and is what is hosted. It also contains some basic resources like favicons and metadata for SEO.
When creating new components, services, utilities, etc...:
Make sure to install and use the Angular Files Generator Extension for VSCode (already enabled if you installed the recommended extensions)
This will generate new files conforming to the project style: Depending on type selection; this will generate starter ts, html as well as storybook and jest test files making it easier to develop well documented and tested code.
Make sure all the typescript code is strongly typed everywhere. This makes it not only more robust but also documents the code better, and allows to quickly know what data types are used in any given place.
If you're making a new cheat-sheet; follow the cs-common-ratios example:
- In the cheat-sheets folder look for the category you want to add to/modify.
- Use the
deniszholob.angular-files-generator
extension to generate a newModule Component
in one of those categories - Add the newly generated component module to the corresponding category module imports
- In the .component file add
public readonly cheatSheetIconId: string = 'Repair_pack'; public readonly cheatSheetTitle: string = 'Title';
- In the .html file add the
<app-cheat-sheet-template [iconId]="cheatSheetIconId" [title]="cheatSheetTitle">Your Content Here</app-cheat-sheet-template>
- In the cheat-sheets folder add a new category folder using the
deniszholob.angular-files-generator
extension to generate a newModule Component
- Follow the other category examples to create new routes, update the html etc..
- Update the cheat-sheets.module
- Update the dav.data
- Add new route to the sitemap.xml
- Add cheat sheets as needed following the guide above
When your work is done:
- Run
npm run build
. - After a successful build, make a commit and push your changes. If you're fixing a existing issue: be sure to link to that issue in the git commit message, like so:
Closes #issueNumberThatGetsFixed
. - Create a new Pull Request.
- Write a good description of the changes this pull-request will make.
- You must provide screenshots if there is a visual change.
- If you get an error with precommit hooks (Mac/Linux), see: https://stackoverflow.com/a/72279243
- Use Firefox print
- Remove
- margins
- headers/footers
- Keep backgrounds
- Scale to 90%
- Remove last page as its empty