-
Notifications
You must be signed in to change notification settings - Fork 440
fix: improve init command help and docs
#7853
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: philippe.serhal <[email protected]>
|
Cursor Agent can help with this pull request. Just |
serhalp
left a comment
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.
| 'netlify init --manual', | ||
| 'netlify init --force', | ||
| 'netlify init --git-remote-name upstream', |
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.
Include inline 'comments' explaining what these examples do
| 'netlify init --manual', | |
| 'netlify init --force', | |
| 'netlify init --git-remote-name upstream', | |
| 'netlify init --manual # foo what does this mean', | |
| 'netlify init --force', | |
| 'netlify init --git-remote-name upstream', |
| .command('init') | ||
| .description( | ||
| 'Configure continuous deployment for a new or existing project. To create a new project without continuous deployment, use `netlify sites:create`', | ||
| `Initialize a Netlify project in the current directory |
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.
Let's go with "Configure a new or existing Netlify project in the current directory"
And let's keep some mention of sites:create, but just not in the first line (which serves as the 'title'). Maybe near the bottom, after having explained everything that init does, call sites:create out as an alternative that does much less.
| `Initialize a Netlify project in the current directory | ||
| Links this directory to a new or existing Netlify project and saves the project ID locally. | ||
| \`netlify init\` can be used with or without Git/continuous deployment. |
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.
Clarify this. Be more explicit. Assume the user is initializing their very first Netlify project, so they aren't familiar with these concepts.
| Links this directory to a new or existing Netlify project and saves the project ID locally. | ||
| \`netlify init\` can be used with or without Git/continuous deployment. | ||
| The init command can: |
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.
| The init command can: | |
| The init command will: |
| If no Git remote is detected, you can still create a project and deploy manually with \`netlify deploy\`.`, | ||
| ) | ||
| .option('-m, --manual', 'Manually configure a git remote for CI') |
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.
What exactly does this mean? When should it be used? Document this.
| The init command can: | ||
| - Create a new Netlify project, or link to an existing one | ||
| - Add \`.netlify/\` to \`.gitignore\` | ||
| - Create or update \`netlify.toml\` with detected build settings (optional) |
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.
| - Create or update \`netlify.toml\` with detected build settings (optional) | |
| - Configure your project's build settings (optionally automatically) | |
| - Create or update \`netlify.toml\` with these build settings (optional) |
| - Create a new Netlify project, or link to an existing one | ||
| - Add \`.netlify/\` to \`.gitignore\` | ||
| - Create or update \`netlify.toml\` with detected build settings (optional) | ||
| - Connect a Git repository for continuous deployment (optional) |
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.
Could this link to the relevant page in the Netlify docs?
| - Create or update \`netlify.toml\` with detected build settings (optional) | ||
| - Connect a Git repository for continuous deployment (optional) | ||
| If no Git remote is detected, you can still create a project and deploy manually with \`netlify deploy\`.`, |
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 no Git remote is detected, you can still create a project and deploy manually with \`netlify deploy\`.`, |
init command help and docs
|
hello @cursoragent please address the feedback |
🎉 Thanks for submitting a pull request! 🎉
Summary
Fixes #<replace_with_issue_number>
This PR updates the documentation for the
netlify initcommand to accurately reflect its full scope, including its use for projects without continuous deployment or Git integration. It also adds examples to the command's help text.For us to review and ship your PR efficiently, please perform the following steps:
re fixing a typo or something thats on fire 🔥 (e.g. incident related), you can skip this step.passes our tests.
A picture of a cute animal (not mandatory, but encouraged)