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

Refactor ninja #102

Merged
merged 10 commits into from
Nov 1, 2023
Merged

Refactor ninja #102

merged 10 commits into from
Nov 1, 2023

Conversation

m4rc1e
Copy link
Collaborator

@m4rc1e m4rc1e commented Oct 31, 2023

This PR refactors the ninja builder logic so it's easier to add arguments. Currently, if you want to add a new CLI argument, you need to add it to main, _diffbrowsers, _diffenator and ninja module (~10 functions). This is a complete pita so my aim in this PR is to allow you to only define the new args in main and they should be available all the way down to the html templates. The _diffenator and _diffbrowsers scripts simple take **kwargs and to cut down on the function args in ninja.py, I've used a builder pattern.

The next pr will refactor the html module so we need to do less argument passing.

@m4rc1e m4rc1e merged commit e426b83 into main Nov 1, 2023
7 checks passed
@m4rc1e m4rc1e mentioned this pull request Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant