SSWConsulting / SSW.Rules

Generator for ssw.com.au/rules
https://www.ssw.com.au/rules
MIT License
13 stars 13 forks source link
decap-cms gatsby gatsbyjs jamstack

SSW.Rules

Gitmoji Scheduled CodeAuditor test

This is a Gatsby generated site pulling data from:

Getting Started

Required Tools

Getting ready for development

Notes:

  • If you don't work at SSW or can't get on to the SSW.Rules team you can just add values to GITHUB_API_PAT and CONTENT_BRANCH
  • For GITHUB_API_PAT, create a PAT on GitHub (remove angle brackets <>)
  • Set CONTENT_BRANCH to sample-content-with-guid (it's a smaller version of the main content branch which will build much quicker πŸ™‚)
  • Sometimes you might want to use main or create your own branch if you are testing something.

Development

  1. Branch off main for your PBI
  2. Install the recommended extensions if using VS Code
  3. Do your work
  4. Run the site in development mode by yarn dev (.env.development is required for this step) it takes a while to build all the rules
    If you have issues, run yarn clean then yarn dev
  5. Commit code and push
  6. Raise a PR
  7. Get it merged!

recommended extensions notification Figure: VS Code recommended extensions notification

Definition of Done

As per rule: Done - Do you go beyond 'Done' and follow a 'Definition of Done'?

Branches

Builds

Rules repository

Rules repository lives here: https://github.com/SSWConsulting/SSW.Rules.Content

Merging changes to main on this repo will trigger:

Example Rule

image Figure: Sample of the Example Rule

Updating and Syncing a Rule from Rules.Content

Sometimes you might have to update a rule markdown file to test your latest feature, such as changing the background color of a greybox.

To update specific markdown components, follow these steps:

  1. Access the sample-content branch:
  2. Edit the Rule:
    • Locate the rule you want to modify in the sample-content branch
  3. Test Your Changes Locally:
    • Open your local instance of SSW.Rules, usually in VS Code
    • Build the project using the following commands: yarn clean and then yarn dev
    • Open your local instance in your browser and navigate to the edited rule to see your changes