-
-
Notifications
You must be signed in to change notification settings - Fork 335
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
[cli] Refactor setup #4597
[cli] Refactor setup #4597
Conversation
Netlify deploy preview |
// eslint-disable-next-line no-console | ||
console.log(); | ||
|
||
const pkg = await findCtaPackageJson(); |
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.
Better to remove this call and pass the version as an option.
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.
If we remove the call, how would we set the default value of the version in case nothing is passed in the version option?
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.
If there is no sensible default, then you make the option mandatory
return 'pnpm'; | ||
} | ||
|
||
export async function findCtaPackageJson() { |
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.
There exist package json types in this workspace already. Should add a return type here.
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.
Few small suggestions. Otherwise seems to be good. 👍
index
code into separate files--example