Skip to content
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

Format dotnew new my-template --help Better #348

Open
RehanSaeed opened this issue Feb 18, 2017 · 2 comments

Comments

@RehanSaeed
Copy link

commented Feb 18, 2017

When I call dotnew new my-template --help, I get the following output with a large number of blank lines and a bigger indent than is necessary. I think this occurs because my symbol names are fairly large.

PS D:\Test> dotnet new bapi --help
Template Instantiation Commands for .NET Core CLI.

Usage: dotnet new [arguments] [options]

Arguments:
  template  The template to instantiate.

Options:
  -l|--list         List templates containing the specified name.
  -lang|--language  Specifies the language of the template to create
  -n|--name         The name for the output being created. If no name is specified, the name of the current directory is used.
  -o|--output       Location to place the generated output.
  -h|--help         Displays help for this command.
  -all|--show-all   Shows all templates


ASP.NET Core 1.1 MVC 6 Boilerplate API (C#)
Author: Muhammad Rehan Saeed (RehanSaeed.com)
Options:


  -T|--TargetFramework                         Decide which version of the .NET Framework to target.


                                                   .NET Core         - Run cross platform (on Windows, Mac and Linux). The framework is made up of NuGet packages which can be shipped with the application so it i
s fully stand-alone.

                                                   .NET Framework    - Gives you access to the full breadth of libraries available in .NET instead of the subset available in .NET Core but requires it to be pre-i
nstalled.

                                                   Both              - Target both .NET Core and .NET Framework.


                                               Default: Both



  -P|--PrimaryWebServer                        The primary web server you want to use to host the site.


                                                   Kestrel        - A web server for ASP.NET Core that is not intended to be internet facing as it has not been security tested. IIS or NGINX should be placed in f
ront as reverse proxy web servers.

                                                   WebListener    - A Windows only web server. It gives you the option to take advantage of Windows specific features, like Windows authentication, port sharing, H
TTPS with SNI, HTTP/2 over TLS (Windows 10), direct file transmission, and response caching WebSockets (Windows 8).

                                               Default: Kestrel



  -Re|--ReverseProxyWebServer                  The internet facing reverse proxy web server you want to use in front of the primary web server to host the site.


                                                   Internet Information Services (IIS)    - A flexible, secure and manageable Web server for hosting anything on the Web using Windows Server. Select this option i
f you are deploying your site to Azure web apps.

                                                   NGINX                                  - A free, open-source, cross-platform high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy serve
r. It does have a Windows version but it's not very fast and IIS is better on that platform.

                                                   Both                                   - Support both reverse proxy web servers.


                                               Default: Both



  -C|--CloudProvider                           Select which cloud provider you are using if any, to add cloud specific features.


                                                   Azure    - The Microsoft Azure cloud. Adds logging features that let you see logs in the Azure portal.


                                                   None     - No cloud provider is being used.


                                               Default: None



  -A|--Analytics                               Monitor internal information about how your application is running, as well as external user information.


                                                   Application Insights    - Monitor internal information about how your application is running, as well as external user information using the Microsoft Azure clo
ud.

                                                   None                    - Not using any analytics.


                                               Default: None



  -Ap|--ApplicationInsightsInstrumentationKey  Your Application Insights instrumentation key e.g. 11111111-2222-3333-4444-555555555555.


                                               string - Optional


                                               Default: APPLICATION-INSIGHTS-INSTRUMENTATION-KEY



  -X|--XmlFormatter                            Choose whether to use the XML input/output formatter and which serializer to use.


                                                   DataContractSerializer    - The default XML serializer you should use. Requires the use of [DataContract] and [DataMember] attributes.


                                                   XmlSerializer             - The alternative XML serializer which is slower but gives more control. Uses the [XmlRoot], [XmlElement] and [XmlAttribute] attribute
s.

                                                   None                      - No XML formatter.


                                               Default: None



  -S|--StatusController                        Returns the status of this API and it's dependencies, giving an indication of it's health. This endpoint can be called by load balancers which can remove an instanc
e of this API if it is not functioning correctly.

                                               bool - Optional


                                               Default: true



  -H|--HttpsEverywhere                         Use the HTTPS scheme and TLS security across the entire site, redirects HTTP to HTTPS, adds Strict Transport Security (HSTS) and Public Key Pinning (HPKP) HTTP head
ers.

                                               bool - Optional


                                               Default: true



  -CO|--CORS                                   Browser security prevents a web page from making AJAX requests to another domain. This restriction is called the same-origin policy, and prevents a malicious site f
rom reading sensitive data from another site. CORS is a W3C standard that allows a server to relax the same-origin policy. Using CORS, a server can explicitly allow some cross-origin requests while rejecting oth
ers.
                                               bool - Optional


                                               Default: true



  -Hu|--HumansTxt                              Adds a humans.txt file where you can tell the world who wrote the application. This file is a good place to thank your developers.


                                               bool - Optional


                                               Default: true



  -Ro|--RobotsTxt                              Adds a robots.txt file to tell search engines not to index this site.


                                               bool - Optional


                                               Default: true



  -Sw|--Swagger                                Swagger is a format for describing the endpoints in your API. Swashbuckle is used to generate a Swagger document and to generate beautiful API documentation, includ
ing a UI to explore and test operations, directly from your routes, controllers and models.

                                               bool - Optional


                                               Default: true



  -R|--RequestId                               Require that all requests send the X-Request-ID HTTP header containing a GUID. This is useful where you have access to the client and server logs and want to correl
ate a request and response between the two.

                                               bool - Optional


                                               Default: false



  -U|--UserAgent                               Require that all requests send the User-Agent HTTP header containing the application name and version of the caller.


                                               bool - Optional


                                               Default: false




@mlorbetske

This comment has been minimized.

Copy link
Contributor

commented Feb 22, 2017

We talked about this a bit today, we're thinking of nesting the additional information indented from the left a bit rather than making it into columns - something like:

PS D:\Test> dotnet new bapi --help
Template Instantiation Commands for .NET Core CLI.

Usage: dotnet new [arguments] [options]

Arguments:
  template  The template to instantiate.

Options:
  -l|--list         List templates containing the specified name.
  -lang|--language  Specifies the language of the template to create
  -n|--name         The name for the output being created. If no name is specified, the name of the current directory is used.
  -o|--output       Location to place the generated output.
  -h|--help         Displays help for this command.
  -all|--show-all   Shows all templates


ASP.NET Core 1.1 MVC 6 Boilerplate API (C#)
Author: Muhammad Rehan Saeed (RehanSaeed.com)
Options:

(Abbreviated)

  -Ro|--RobotsTxt
        Adds a robots.txt file to tell search engines not to index this site.

        bool - Optional

        Default: true



  -Sw|--Swagger
        Swagger is a format for describing the endpoints in your API. Swashbuckle is used to generate a 
        Swagger document and to generate beautiful API documentation, including a UI to explore and 
        test operations, directly from your routes, controllers and models.

        bool - Optional

        Default: true



  -R|--RequestId
        Require that all requests send the X-Request-ID HTTP header containing a GUID. This is useful
        where you have access to the client and server logs and want to correlate a request and 
        response between the two.

        bool - Optional

        Default: false



  -U|--UserAgent
        Require that all requests send the User-Agent HTTP header containing the application name and
        version of the caller.

        bool - Optional

        Default: false

What do you think of this layout?

@RehanSaeed

This comment has been minimized.

Copy link
Author

commented Feb 22, 2017

I like the wrapping of lines. However, I would lose a few more new blank lines:

PS D:\Test> dotnet new bapi --help
Template Instantiation Commands for .NET Core CLI.

Usage: dotnet new [arguments] [options]

Arguments:
  template  The template to instantiate.

Options:
  -l|--list         List templates containing the specified name.
  -lang|--language  Specifies the language of the template to create
  -n|--name         The name for the output being created. If no name is specified, the name of the current directory is used.
  -o|--output       Location to place the generated output.
  -h|--help         Displays help for this command.
  -all|--show-all   Shows all templates

ASP.NET Core 1.1 MVC 6 Boilerplate API (C#)
Author: Muhammad Rehan Saeed (RehanSaeed.com)

Options:
  -Ro|--RobotsTxt             (bool - Default: true)
        Adds a robots.txt file to tell search engines not to index this site.
  -Re|--ReverseProxyWebServer (choice - Default: Both)
        The internet facing reverse proxy web server you want to use in front of the primary web server to host the site.
        - Internet Information Services (IIS) - A flexible, secure and manageable Web server for hosting anything on the Web using Windows Server. Select this option if you are deploying your site to Azure web apps.
        - NGINX - A free, open-source, cross-platform high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy serve
r. It does have a Windows version but it's not very fast and IIS is better on that platform.
        - Both - Support both reverse proxy web servers.
...

@mlorbetske mlorbetske added this to Issues in Command Line Feb 28, 2017

@mlorbetske mlorbetske moved this from Issues to In progress in Command Line Feb 28, 2017

@mlorbetske mlorbetske modified the milestones: Backlog, VS2017 Post-RTW Jul 17, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.