-
Notifications
You must be signed in to change notification settings - Fork 307
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
New command: docs
#3958
Comments
@pnp/cli-for-microsoft-365-maintainers any comments? |
Perhaps even more interesting is to add an optional option for directly opening the documentation of a command. example |
@nicodecleyre thanks for your suggestion. |
in the browser the example outputs can be much clearer then in the console especially for text & csv outputs |
For sure they are more readable on a web page than in console 👍, Not feeling it as I was like thinking this command might be used to quickly get to documentation that is not available via console, like how to authenticate with a custom AAD app, or use |
@pnp/cli-for-microsoft-365-maintainers should we ship it? any comments? |
If you'd be looking for help of a command, wouldn't it be more intuitive to attach it to a command, like Also, are we expecting another verb on docs than |
@waldekmastykarz good idea to extend the existing commands with an additional option to browse for help 👍 Would you agree if I open it as a separate issue, and we will remove this functionality from here? |
Definitely! |
+1 on this suggestion but I'm not quite sure about the option name |
+1, I think attaching it to the command would be the more intuitive way to approach this. @Adam-it I'm interested, if you are already on the command line you can return the help documentation quite easily using |
TBH this wasn't my intention/initial idea. If you would look at the comments above it is actually brought up by Nico. My initial idea was just to add a simple command that when used will open CLI docs web page on the home site. The idea behind it was to easily get to the right source that for example has additional guidance how to use CLI in docker. Getting to command docs was not the initial plan here as I also agree the console help is sufficient 😉. |
Thanks @Adam-it, I was just curious, sometimes a new feature is not needed if we look at the reason why it was asked for. Maybe we could take inspiration from the If you use the |
so if i get it right, that would result in an extra option |
thanks, @waldekmastykarz, @garrytrinder, and @nicodecleyre for the discussion on this command. Opening this up as a simple command just to start the CLI docs web page in the default browser. For the online help for each command, I go with @garrytrinder suggestion and create a separate issue for it 👍 |
See my comment on #4037 but tl;dr |
@waldekmastykarz sure will check. but regarding this issue, and its current status, I suppose all looks fine right? |
If we implement just what's in the spec and leave what's in the thread be for now, it's good to go. |
Hi, Can I pick this up? |
Awesome, all yours @Saurabh7019!! |
I intended to use the 'open' package to access the CLI documentation URL, but it appears that 'open' does not function correctly on Windows. I have tested it on multiple devices. As a workaround, I planned to use the 'start' command on Windows and 'open' on Mac and other devices. However, even 'start' is not working in the CLI solution. I am currently exploring alternative workarounds and would appreciate any suggestions you may have. |
Hi @Saurabh7019, while taking a closer look to the issues in the github repo of open, i stumbled upon an (unresolved) issue where they have the same problem. sindresorhus/open#298 ... I can't quite tell, but I have a feeling I know these guys from somewhere.. 🤔 All jokes aside, is it an option to use |
Even that is not working unfortunately 😕 (Because, when using OS X or Linux devices, it will specifically wait until the browser is closed) |
I should have read this thread sooner! Looks like we are waiting for the 'open' package maintainers to resolve this issue. |
Do you know why 'exec' isn't working as expected in CLI solution?
It works fine with the same Node version on the same machine in a different project, but not in this CLI project. |
since we use it here:
, i would expect it should work. What's the error that you get? |
We already have logic to open URLs in the CLI based on the open package. I suggest, that we keep it consistent across the CLI. If it's not working as expected, then I suggest that we fix it centrally so that it works the same way everywhere, rather than introducing a novel way specific for this command. |
The issue is that we still didn't receive feedback from the owner of the open repo. I could create a workaround, specific for Windows users. But I'm not sure what about future changes. |
The approach of using "start" on Windows and "open" on other devices should work as a workaround. If you approve, I will make the same changes to the other commands. |
Since CLI is cross-platform, we need to ensure that whatever solution we choose works on all platforms. Also, if we end up using a different approach than the |
It makes sense. I will avoid using platform specific code, and instead use the 'open' package to complete this command. |
author Saurabh <saurabh.k.a.tripathi@avanade.com> 1682755281 +0200 committer Saurabh <saurabh.k.a.tripathi@avanade.com> 1683972581 +0200 New command: docs pnp#3958 adjusted test to re-run the PR checks removed package json reference Command updated to eliminate the need for logging in. define before and after hooks for the test suite Incorporated pull request review changes Rolled back changes related to the 'open' package and included changes from the PR review define before and after hooks for the test suite Incorporated pull request review changes Incorporated pull request review changes Rolled back changes related to the 'open' package and included changes from the PR review define before and after hooks for the test suite Incorporated pull request review changes
author Saurabh <saurabh.k.a.tripathi@avanade.com> 1682755281 +0200 committer Saurabh <saurabh.k.a.tripathi@avanade.com> 1683972581 +0200 New command: docs pnp#3958 adjusted test to re-run the PR checks removed package json reference Command updated to eliminate the need for logging in. define before and after hooks for the test suite Incorporated pull request review changes Rolled back changes related to the 'open' package and included changes from the PR review define before and after hooks for the test suite Incorporated pull request review changes Incorporated pull request review changes Rolled back changes related to the 'open' package and included changes from the PR review define before and after hooks for the test suite Incorporated pull request review changes
Usage
m365 docs [options]
Description
Opens CLI for Microsoft 365 docs webpage in the default browser
Examples
Opens CLI for Microsoft 365 docs webpage in the default browser
The text was updated successfully, but these errors were encountered: