-
Notifications
You must be signed in to change notification settings - Fork 23
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: project options type shared with build + config init #88
Conversation
|
commit: |
2255cfe
to
7570200
Compare
7570200
to
24ec9c0
Compare
24ec9c0
to
cc44647
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, I added a few minor comments.
For the next time please do me a favor and split changes in multiple commits. For example the first commit should have been the config refactoring and the second the renaming which would be trivial to review. It would be much faster to review.
Ah sorry about that, totally fair point - will do in the future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Context
We have what seems to be a pre-options and then options. It would help in the long-term to have a single set of options that we use to stub the project setup and the config creation, especially if we add more CLI options in the future. Therefore, the types are slightly refactored to share the same thing between the creation of the project config and the project setup function.
I don't mind if you want to keep it as is, but I think it would be simpler to have a single object used between the two.
I wanted to move the config creation to before the project setup outside but it currently depends on the build happening in order to generate the config unfortunately for the .next server directory.
Changes
builderOutput
tooutputDir
andnextApp
tosourceDir
, as it's the output directory and the source directory.basically centralises where i need to make a change if i want to add a new cli arg (e.g. #89) and use it in the config, otherwise you need to update multiple types and args normally