-
-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Define new event target for JSON, and revert option passing
For the program to be consistent, the 'EventListener' target that we pass to a Project should be responsible for the output format. Otherwise, we are contingent on developers to remember passing the option at call-site. Plus, it overloads the project code with an extra boolean option. Instead, since the behaviour is solely driven by the execution context, we can instantiate a different event target upfront, and simply hold on to it throughout the program. As a nice side-effect, we can gently re-organize the code to keep the terminal printing logic and the json printing logic separate.
- Loading branch information
Showing
9 changed files
with
618 additions
and
594 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.