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

Move core logic into new "core" package #73

Closed
matejchalk opened this issue Sep 26, 2023 · 2 comments
Closed

Move core logic into new "core" package #73

matejchalk opened this issue Sep 26, 2023 · 2 comments
Assignees

Comments

@matejchalk
Copy link
Collaborator

matejchalk commented Sep 26, 2023

Proposal

  • all our core logic that's not Yargs-related lives in utils - too much?
  • utils could be only for more generic helper functions, e.g. executeProcess or Markdown formatters
  • core logic like collect and executePlugin could live in core package

Motivation

  • core package should be for programmatic usage of our core logic (e.g. used by our GitHub Action)
  • cleaner separation of core and plugin layers - plugin-* packages can import from utils or models, but not from core
  • the cli project might not then need multiple entry points (only bin)
  • having separate cli and core is quite common in other CLI-first projects (e.g. jest or graphql-code-generator)

Nx graph

Image

@BioPhoton
Copy link
Collaborator

BioPhoton commented Oct 2, 2023

As this refactoring is pretty involved in the whole code base i suggest the changes in the following order:

  1. Prepare the codebase for the move - especially functions that will move should file in independent fils
    1.1. utils: refactor(models): add global options #76
    1.2. cli: refactor(cli): prepare for core package  #80
  2. Create the new core package => it accidentally got pushed already. sry 💩
  3. Move files from cli to utils and core
  4. Move files from utils to core => feat(utils): move parts from utils into core #81
  5. Cleanup refactoring => fix: refactor after core package intro #83

BioPhoton added a commit that referenced this issue Oct 2, 2023
This PR includes a small refactoring to align with #73
BioPhoton added a commit that referenced this issue Oct 2, 2023
This PR includes new files that will be moved into other packages in the
future

related to #73
closes to #79
@vmasek vmasek modified the milestones: Presentation, Integration Oct 6, 2023
@matejchalk
Copy link
Collaborator Author

Closing since all the mentioned PRs have been merged.

@BioPhoton BioPhoton mentioned this issue Oct 18, 2023
3 tasks
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

No branches or pull requests

3 participants