Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve on code for satellite sites #745

Closed
nilsml opened this issue Jan 18, 2022 · 1 comment
Closed

Improve on code for satellite sites #745

nilsml opened this issue Jan 18, 2022 · 1 comment
Labels
⚙️ task A single task. If linked to a user story it is a sub-task. 🛠 technical Technical stuffs like reducing debt, refactor or improve code base

Comments

@nilsml
Copy link
Contributor

nilsml commented Jan 18, 2022

In order to make the job of adding new satellites sites less error-prone, we need to make the code more robust

Possible actions

  • Have everything typed (not possible atm because of next.config.js)
  • Create a DSL for configuring the satellite sites. Example: satellites.add(newsatellite('germany').useDataset('germany').withLanguage('german').alternative('english'))
  • Use functional concepts for the satellite config:
const newSatellite = (name: string): SatelliteSite => …
const useDataset = (s: SatelliteSite) => (dataSet: string): SatelliteSite => …
const withPrimaryLanguage = (s: SatelliteSite) => (language: string): SatelliteSite => …
const build = (s: SatelliteSite): ConfiguredSatelliteSite => …

const buildGermanSatellite = pipe(newSatellite('germany'), useDataSet('germany'), withPrimaryLanguage(('german'), build)
  • Connect the content in the datasetHelpers.ts more closely to the satellites config
@nilsml nilsml added ⚙️ task A single task. If linked to a user story it is a sub-task. 🛠 technical Technical stuffs like reducing debt, refactor or improve code base labels Jan 18, 2022
@nilsml
Copy link
Contributor Author

nilsml commented Sep 20, 2023

The setup we have now works pretty well.

@nilsml nilsml closed this as completed Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚙️ task A single task. If linked to a user story it is a sub-task. 🛠 technical Technical stuffs like reducing debt, refactor or improve code base
Projects
None yet
Development

No branches or pull requests

1 participant