You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add script to update state config type and README default config from init.lua
# Details
Currently any time an argument is added to the configuration, it
needs to replicated in 3 places:
- `init.lua` with the user config classes and default configuration
- `state.lua` with non optional main config
- `README.md` with the updated default config
This is mildly annoying and error prone.
Instead use `init.lua` as our source of truth and replicate this
information to `state.lua` and `README.md`. Logic is contained
in `scripts/update.py` and can be executed with `just update`.
To make this easier 2 other changes were made:
- Rather than storing the config classes like `render.md.Config`
in `state.lua` move this to a new module `types.lua`. By doing
this we avoid needing special handling for the other information
contained in `state.lua` and instead can fully overwrite `types.lua`.
- Add comments on default config currently only in `README.md` to
the config in `init.lua`, that way when the configuration is pulled
the comments get included as well with no special logic.
0 commit comments