-
Notifications
You must be signed in to change notification settings - Fork 206
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
feat: Init command #780
base: main
Are you sure you want to change the base?
feat: Init command #780
Conversation
To view this pull requests documentation preview, visit the following URL: Documentation is deployed and generated using docs.page. |
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.
Looking forward to this feature!
argParser.addMultiOption( | ||
'packages', | ||
abbr: 'p', | ||
help: 'Comma separated packages to add in top level `packages` array', |
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.
help: 'Comma separated packages to add in top level `packages` array', | |
help: 'Comma separated packages to add in top level `packages` array.', |
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.
This one should probably be a bit more descriptive, "add in top level packages
array" doesn't really say much to the user.
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.
Take a look at what I have now "Comma separated glob paths to add to the melos workspace."
final project = argResults!['project'] as String? ?? | ||
promptInput( | ||
'Enter the project name', | ||
defaultsTo: workspaceName, | ||
); |
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.
I don't think that we need to differentiate between workspace name and project name
|
||
logger.log( | ||
'Initialized Melos workspace in ${dir.path}.\n' | ||
'Run the following commands to bootstrap the workspace:\n' |
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.
'Run the following commands to bootstrap the workspace:\n' | |
'Run the following commands to bootstrap the workspace when you have created some packages and/or apps:\n' |
Since this won't do anything when run directly after init
has been run we should explain that they should run this once the apps and/or packages are created.
logger.log( | ||
'Initialized Melos workspace in ${dir.path}.\n' | ||
'Run the following commands to bootstrap the workspace:\n' | ||
' cd ${dir.path}\n' |
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 the path
is .
we should omit this
@@ -84,6 +87,7 @@ class Melos extends _Melos | |||
|
|||
abstract class _Melos { | |||
MelosLogger get logger; | |||
|
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.
defaultsTo: workspaceName, | ||
); | ||
final useAppsDir = promptBool( | ||
message: 'Do you want to add the apps directory to the list of packages?', |
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.
message: 'Do you want to add the apps directory to the list of packages?', | |
message: 'Do you want to add the apps directory?', |
We are actually creating the apps
directory right? I don't think we need to specify that it will be added in the melos.yaml file too, and the wording as is is slightly confusing.
Closes #773
Description
Adds
init
command to melosType of Change
feat
-- New feature (non-breaking change which adds functionality)fix
-- Bug fix (non-breaking change which fixes an issue)!
-- Breaking change (fix or feature that would cause existing functionality to change)refactor
-- Code refactorci
-- Build configuration changedocs
-- Documentationchore
-- Chore